Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance workflow for ruby compatibility #457

Merged
merged 5 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading