Check Documentation Links #30
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 Documentation Links | |
| on: | |
| push: | |
| branches: [master, main] | |
| paths: ['docusaurus/**'] | |
| pull_request: | |
| branches: [master, main] | |
| paths: ['docusaurus/**'] | |
| schedule: | |
| - cron: '0 3 * * 0' # Weekly Sunday 03:00 UTC | |
| workflow_dispatch: | |
| jobs: | |
| check-markdown: | |
| name: Check links in markdown sources | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check links in docs and blog | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: > | |
| --base-url https://genie.devoxx.com | |
| --config .lychee.toml | |
| --verbose | |
| --no-progress | |
| './docusaurus/docs/**/*.md' | |
| './docusaurus/blog/**/*.md' | |
| fail: true | |
| failIfEmpty: false | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| check-live-site: | |
| name: Check live site via sitemap | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check live site links | |
| id: lychee | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: > | |
| --config .lychee.toml | |
| --verbose | |
| --no-progress | |
| https://genie.devoxx.com/sitemap.xml | |
| fail: false | |
| failIfEmpty: false | |
| output: lychee-report.md | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create issue on broken links | |
| if: steps.lychee.outputs.exit_code != 0 | |
| uses: peter-evans/create-issue-from-file@v5 | |
| with: | |
| title: 'Broken links detected on genie.devoxx.com' | |
| content-filepath: lychee-report.md | |
| labels: documentation, broken-links |