mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-10 14:01:22 -06:00
This is a small PR that: - adds a `fixtures/Gemfile-github-pages`, the minimum gemfile necessary to build the site - adds a new Actions workflow to build the site with that gemfile In the future, this should prevent issues like #1074, where we push a change that passes the `jekyll` CI but fails to build on `github-pages` (and its dependencies - which in this case, was an older version of ruby sass). (to be honest - not super happy with the code duplication, but I also think we'll have different build matrices for the different versions, so I'm fine with this for now) Part of (but does not close) #1145.
66 lines
1.6 KiB
YAML
66 lines
1.6 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- 'v**'
|
|
|
|
name: CI
|
|
|
|
jobs:
|
|
jekyll-build:
|
|
name: Build Jekyll site
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
jekyll-version: [3.9, 4.3]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Setup Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '3.1' # Not needed with a .ruby-version file
|
|
bundler-cache: false
|
|
- name: Bundle Install
|
|
run: bundle install
|
|
- name: Install Jekyll ${{ matrix.jekyll-version }}
|
|
run: gem install jekyll -v ${{ matrix.jekyll-version }}
|
|
- name: Init Search
|
|
run: bundle exec rake search:init
|
|
- name: Build Site
|
|
run: bundle exec jekyll build
|
|
|
|
github-pages-build:
|
|
name: Build (github-pages gem)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Setup Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '3.1' # Not needed with a .ruby-version file
|
|
bundler-cache: false
|
|
- name: Bundle Install
|
|
run: BUNDLE_GEMFILE=fixtures/Gemfile-github-pages bundle install
|
|
- name: Build Site
|
|
run: BUNDLE_GEMFILE=fixtures/Gemfile-github-pages bundle exec jekyll build
|
|
|
|
assets:
|
|
name: Test CSS and JS
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [18.x]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- run: npm install
|
|
- run: npm test
|