Skip to content

Commit

Permalink
Merge pull request #462 from sylhare/gem-flow
Browse files Browse the repository at this point in the history
Update build workflows
  • Loading branch information
sylhare authored Aug 15, 2024
2 parents 09e5ca7 + b30d191 commit 3c31637
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 45 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
name: Build Docker with theme
name: Build with Docker

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
image:

runs-on: ubuntu-latest
strategy:
matrix:
# The jekyll/builder is used by GitHub pages
docker-image: [ 'jekyll/builder', 'sylhare/jekyll' ]

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
with:
ruby-version: '3.3'
uses: ruby/setup-ruby@v1
- name: Build with Docker
continue-on-error: true
run: |
cd assets && docker build .
- name: Build the site in the container
run: |
docker run \
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
${{ matrix.docker-image }}:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
- name: Pull docker images
continue-on-error: true
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gem-build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Build Ruby Gem
name: Type-on-strap CI

on:
pull_request:
branches: [ master ]

jobs:
test:
ruby:

runs-on: ubuntu-latest
strategy:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gem-github-page.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Build theme as GitHub page
name: Type-on-strap CI (GitHub Pages)

on:
pull_request:
branches: [ master ]

jobs:
test:
ruby:

runs-on: ubuntu-latest
strategy:
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/jekyll-build.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .github/workflows/publish-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ jobs:
ruby-version: 3.1.0
- name: Install
run: bundle install
- name: Build jekyll site
run: bundle exec jekyll build
- name: Build the gem
continue-on-error: true
run: |
gem build *.gemspec
echo `find . -name "*.gem" | tail -1 | awk -F"[/]" '{print $2}'`
Expand Down
4 changes: 3 additions & 1 deletion assets/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ LABEL image="sylhare/type-on-strap"
# Create Type-on-strap Gemfile
RUN echo "source \"https://rubygems.org\"" >> Gemfile
RUN echo "gem 'type-on-strap', '>= 2.4.10', '< 3.0'" >> Gemfile
RUN echo "Adding the Gemfile" >> cat Gemfile
RUN echo "Adding the Gemfile"
RUN cat Gemfile

# Install the theme
RUN bundle update
RUN bundle install

# Make it accessible from outside
Expand Down

0 comments on commit 3c31637

Please sign in to comment.