зеркало из https://github.com/github/docs.git
43 строки
1.2 KiB
YAML
43 строки
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@ec3a7ce113134d7a93b817d10a8272cb61118579
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
|
with:
|
|
node-version: 16.14.x
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci --include=optional
|
|
|
|
- name: Cache nextjs build
|
|
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
|
|
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
|