Skip to content

Add gems for smoother installation #10

Add gems for smoother installation

Add gems for smoother installation #10

name: Type-on-strap CI (GitHub Pages)
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
# GitHub pages use docker jekyll/builder to deploy the site
- name: Build the site in the container
run: |
docker run \
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
- name: Start Jekyll site
run: timeout 10s bundle exec jekyll serve
continue-on-error: true