Skip to content

Bump ruby/setup-ruby from 1.159.0 to 1.160.0 #3715

Bump ruby/setup-ruby from 1.159.0 to 1.160.0

Bump ruby/setup-ruby from 1.159.0 to 1.160.0 #3715

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@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: ruby/setup-ruby@036ef458ddccddb148a2b9fb67e95a22fdbf728b
with:
bundler-cache: true
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
with:
node-version: '16'
- name: Cache node modules
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
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@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: site
path: build
retention-days: 1
htmlproofer:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: ruby/setup-ruby@036ef458ddccddb148a2b9fb67e95a22fdbf728b
with:
bundler-cache: true
- name: Download built site
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
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@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: ruby/setup-ruby@036ef458ddccddb148a2b9fb67e95a22fdbf728b
with:
bundler-cache: true
- name: Download built site
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: site
path: build
# Checkout stripped-down gh-pages branch to a subdirectory, for publishing
- name: Checkout gh-pages branch
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
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"