Skip to content

Bump ruby/setup-ruby from 1.197.0 to 1.200.0 #4551

Bump ruby/setup-ruby from 1.197.0 to 1.200.0

Bump ruby/setup-ruby from 1.197.0 to 1.200.0 #4551

Workflow file for this run

---
on:
pull_request:
push:
branches-ignore:
- gh-pages
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: ruby/setup-ruby@217c988b8c2bf2bacb2d5c78a7e7b18f8c34daed
with:
bundler-cache: true
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version: '16'
- name: Cache node modules
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: npm-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-${{ runner.os }}-build-${{ env.cache-name }}-
npm-${{ runner.os }}-build-
npm-
- name: Install NPM dependencies
run: npm install
- name: Test
run: bundle exec rspec
- name: Lint
run: bundle exec rubocop --parallel
- name: Validate schema
run: bundle exec rake schema
- name: Build
run: bundle exec rake build
- name: Upload built site
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: site
path: build
retention-days: 1
htmlproofer:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: ruby/setup-ruby@217c988b8c2bf2bacb2d5c78a7e7b18f8c34daed
with:
bundler-cache: true
- name: Download built site
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: site
path: build
- name: Test built site
run: bundle exec rake htmlproofer
publish:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
needs: build
permissions:
contents: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: ruby/setup-ruby@217c988b8c2bf2bacb2d5c78a7e7b18f8c34daed
with:
bundler-cache: true
- name: Download built site
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: site
path: build
# Checkout stripped-down gh-pages branch to a subdirectory, for publishing
- name: Checkout gh-pages branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: gh-pages
path: tmp/publish
- name: Publish
run: |
git config --global user.email "github-actions@github.com"
git config --global user.name "github-actions"
bundle exec rake publish CLONED_GH_PAGES_DIR="tmp/publish"