Check WCAG compliance #205
This file contains hidden or 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
| name: Check WCAG compliance | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 2 * * 0" | |
| jobs: | |
| check-wcag: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| run: npm install -g pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build Docusaurus site | |
| run: pnpm run build | |
| - name: Serve Files | |
| uses: Eun/http-server-action@v1 | |
| with: | |
| content-types: | | |
| { | |
| "css": "text/css", | |
| "html": "text/html", | |
| "ico": "image/x-icon", | |
| "jpeg": "image/jpeg", | |
| "jpg": "image/jpeg", | |
| "js": "text/javascript", | |
| "json": "application/json", | |
| "png": "image/png", | |
| "svg": "image/svg+xml", | |
| "txt": "text/plain", | |
| "xml": "text/xml" | |
| } | |
| port: 3000 | |
| directory: build/ | |
| index-files: | | |
| ["index.html"] | |
| - name: Run Axe to check for WCAG compliance | |
| run: node scripts/wcag-sitemap-check.js | |
| - name: Upload WCAG report to Slack | |
| if: always() | |
| uses: slackapi/slack-github-action@v2.1.1 | |
| with: | |
| method: files.uploadV2 | |
| token: ${{ secrets.SLACK_BOT_TOKEN }} | |
| payload: | | |
| channel_id: ${{ secrets.SLACK_CHANNEL_ID }} | |
| initial_comment: "WCAG rapport:" | |
| file: "./wcag-report.txt" | |
| filename: "wcag-report.txt" |