Regularly check for broken links and report those as issue #234
This file contains 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: Regularly check for broken links and report those as issue | |
on: | |
schedule: | |
- cron: '0 2 * * 1' | |
workflow_dispatch: | |
jobs: | |
check: | |
if: github.repository == 'contao/docs' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
extensions: json | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache Composer vendor | |
uses: actions/cache@v3 | |
with: | |
path: link-checker/vendor/ | |
key: ${{ runner.os }}-link-checker-vendor | |
- name: Install Composer dependencies | |
run: cd link-checker && composer install --no-interaction --no-suggest | |
- name: Link checker (dev) | |
run: link-checker/check dev | |
continue-on-error: true | |
- name: Link checker (manual) | |
run: link-checker/check manual | |
continue-on-error: true | |
- name: Create issue (dev) | |
uses: peter-evans/create-issue-from-file@v4 | |
with: | |
title: Link Checker Report | |
content-filepath: ./link-checker/dev-result.md | |
labels: | | |
Bug | |
Developer Documentation | |
- name: Create issue (manual) | |
uses: peter-evans/create-issue-from-file@v4 | |
with: | |
title: Link Checker Report | |
content-filepath: ./link-checker/manual-result.md | |
labels: | | |
Bug | |
User Manual |