43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
name: Pa11y
|
|
|
|
# **What it does**: Runs a static accessibility check on high traffic docs pages.
|
|
# **Why we have it**: We want accessibility support for the docs.
|
|
# **Who does it impact**: Docs engineering, users who need accessibility features.
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '25 17 * * *' # once a day at 17:25 UTC / 11:50 PST
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repo
|
|
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
|
with:
|
|
node-version: 16.15.x
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci --include=optional
|
|
|
|
- name: Cache nextjs build
|
|
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09
|
|
with:
|
|
path: .next/cache
|
|
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
|
|
|
|
- name: Run build scripts
|
|
run: npm run build
|
|
|
|
- name: Run pa11y tests
|
|
run: npm run pa11y-test
|