Skip to content

Commit

Permalink
Merge pull request #457 from sylhare/ruby
Browse files Browse the repository at this point in the history
Enhance workflow for ruby compatibility
  • Loading branch information
sylhare authored Aug 9, 2024
2 parents 6689ef0 + 4bc7d17 commit f634101
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 18 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build Docker with theme

on:
pull_request:
branches: [ master ]

jobs:
test:

runs-on: ubuntu-latest

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: Pull docker images
continue-on-error: true
run: |
docker pull sylhare/type-on-strap
docker pull sylhare/jekyll
23 changes: 6 additions & 17 deletions .github/workflows/gem-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '2.7.4', '3.0', '3.1', '3.2' ]
ruby: [ '3.1', '3.2', '3.3' ]

steps:
- uses: actions/checkout@v4
Expand All @@ -21,35 +21,24 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Install github-pages gem 2.7.4
continue-on-error: true
run: bundle install
working-directory: ./.github/workflows/ruby-2.7.4
if: matrix.ruby == '2.7.4'
- name: Install github-pages gem
run: |
gem install github-pages
gem update --system
if: matrix.ruby != '2.7.4'
- name: Install
run: bundle install
- name: Build jekyll site
run: bundle exec jekyll build
- name: Start Jekyll site
run: timeout 10s bundle exec jekyll serve
continue-on-error: true
- name: Build the gem
continue-on-error: true
run: |
gem build *.gemspec
echo `find . -name "*.gem" | tail -1 | awk -F"[/]" '{print $2}'`
- name: Install theme gems
continue-on-error: true
run: |
gem cleanup type-on-strap
gem install type-on-strap --source "https://rubygems.org"
gem install jekyll-theme-type-on-strap --source "https://rubygems.org"
- name: GPR
continue-on-error: true
run: |
gem cleanup type-on-strap
gem install type-on-strap --version "2.4.10" --source "https://rubygems.pkg.github.com/sylhare"
- name: Build with Docker
continue-on-error: true
run: |
cd assets && docker build .
40 changes: 40 additions & 0 deletions .github/workflows/gem-github-page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build theme as GitHub page

on:
pull_request:
branches: [ master ]

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '2.7.4', '3.0', '3.3' ]

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Install github-pages gem 2.7.4
continue-on-error: true
run: bundle install
working-directory: ./.github/workflows/ruby-2.7.4
if: matrix.ruby == '2.7.4'
- name: Install github-pages gem
run: |
gem install github-pages
gem update --system
if: matrix.ruby != '2.7.4'
- name: Install
run: bundle install
- name: Build jekyll site
run: bundle exec jekyll build
- name: Start Jekyll site
run: timeout 10s bundle exec jekyll serve
continue-on-error: true
2 changes: 1 addition & 1 deletion .github/workflows/jekyll-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
-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: Install packages
- name: Pull docker images
continue-on-error: true
run: |
docker pull sylhare/type-on-strap
Expand Down

0 comments on commit f634101

Please sign in to comment.