diff --git a/.github/workflows/a11y.yml b/.github/workflows/a11y.yml index f489665..0c6a049 100644 --- a/.github/workflows/a11y.yml +++ b/.github/workflows/a11y.yml @@ -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 diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 9f2eb76..50fc8c7 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -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 diff --git a/.github/workflows/package.json b/.github/workflows/package.json new file mode 100644 index 0000000..3da9be6 --- /dev/null +++ b/.github/workflows/package.json @@ -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" + } +}