Skip to content

Commit

Permalink
Add pa11y-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
beechnut committed May 17, 2023
1 parent f72cdc2 commit ddcc077
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/a11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.110.0'
hugo-version: 'latest'
extended: true

- name: Set up pa11y
run: npm install

- name: Run Hugo server
run: hugo server --configDir .
- name: Run server in background
run: npm run serve-bg

- name: Run pa11y-ci
run: pa11y-ci --sitemap http://localhost:1313/sitemap.xml
run: npm run pa11y-ci:sitemap
6 changes: 3 additions & 3 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v1

- name: hugo
uses: klakegg/actions-hugo@1.0.0
- name: hugo
uses: klakegg/actions-hugo@1.0.0
9 changes: 9 additions & 0 deletions .github/workflows/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"scripts": {
"serve-bg": "hugo serve &",
"pa11y-ci:sitemap": "pa11y-ci --sitemap http://localhost:1313/sitemap.xml --sitemap-exclude \"/*.pdf\""
},
"devDependencies": {
"pa11y-ci": "^2.4.0"
}
}

0 comments on commit ddcc077

Please sign in to comment.