Add cross-platform plugin support #478
Workflow file for this run
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 for broken links and accessibility issues | |
| on: | |
| # Run daily at 9:00 AM | |
| schedule: | |
| - cron: '0 9 * * *' | |
| # Run on PRs to main | |
| pull_request: | |
| branches: [ main ] | |
| # Allow manual triggering | |
| workflow_dispatch: | |
| jobs: | |
| check-links: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| # Excluded URLs: | |
| # - rijksportaal.overheid-i.nl: Internal government portal | |
| # - rijkscloud.nl: Restricted API access | |
| # - bio-overheid.nl/ico-wizard: Returns 403 for automated checkers but works for users | |
| # - Sites blocking automated link checkers (415/connection refused): | |
| # gebruikercentraal.nl, nldesignsystem.nl, digitaleoverheid.nl, | |
| # gebruikersonderzoeken.nl, digitoegankelijk.nl, usmwiki.com, | |
| # rijksoverheid.nl, wetten.overheid.nl, dutchcloudcommunity.nl | |
| - name: Link Checker | |
| id: lychee | |
| uses: lycheeverse/lychee-action@v2.8.0 | |
| with: | |
| # Target specific files and improve the arguments | |
| args: >- | |
| --verbose | |
| --no-progress | |
| --exclude-loopback | |
| --exclude "file:///.*/issues.*" | |
| --exclude "file:///home/runner/work/.*" | |
| --exclude "https://rijksportaal.overheid-i.nl/.*" | |
| --exclude "https://rijkscloud.nl/.*" | |
| --exclude "https://bio-overheid.nl/ico-wizard" | |
| --exclude "https://dutchcloudcommunity\.nl/.*" | |
| --exclude "https://.*gebruikercentraal\.nl/.*" | |
| --exclude "https://.*nldesignsystem\.nl/.*" | |
| --exclude "https://gebruikersonderzoeken\.nl/.*" | |
| --exclude "https://kennisbank\.digitoegankelijk\.nl/.*" | |
| --exclude "https://usmwiki\.com/.*" | |
| --exclude "https://www\.digitaleoverheid\.nl/.*" | |
| --exclude "https://www\.rijksoverheid\.nl/.*" | |
| --exclude "https://wetten\.overheid\.nl/.*" | |
| '**/*.yaml' | |
| '**/*.md' | |
| '**/*.ts' | |
| '**/*.vue' | |
| # Output file for creating issues | |
| output: ./lychee/out.md | |
| # Only create an issue when broken links are found AND running on schedule/manual | |
| - name: Create Issue (Only on schedule or manual run) | |
| if: ${{ failure() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }} | |
| uses: peter-evans/create-issue-from-file@v6 | |
| with: | |
| title: Broken links detected | |
| content-filepath: ./lychee/out.md | |
| labels: broken-links | |
| accessibility-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '18' | |
| - name: Install Pa11y tools | |
| run: npm install -g pa11y-ci | |
| - name: Test all pages with sitemap | |
| run: | | |
| mkdir -p reports | |
| pa11y-ci --sitemap https://minbzk.github.io/NeRDS/sitemap.xml \ | |
| --reporter json \ | |
| --output reports/a11y-report.json || echo "Issues found" | |
| - name: Upload results | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: accessibility-reports | |
| path: reports/ | |
| retention-days: 7 | |
| - name: Create issue on failure | |
| if: failure() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') | |
| uses: peter-evans/create-issue-from-file@v6 | |
| with: | |
| title: Accessibility issues detected across site | |
| content-filepath: ./reports/a11y-report.json | |
| labels: accessibility |