Bump github/codeql-action from 3.27.0 to 3.27.3 #4558
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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@7bae1d00b5db9166f4f0fc47985a3a5702cb58f0 | |
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@7bae1d00b5db9166f4f0fc47985a3a5702cb58f0 | |
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@7bae1d00b5db9166f4f0fc47985a3a5702cb58f0 | |
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" |