diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index e97202e0..34674d6a 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -5,13 +5,12 @@ on: workflow_dispatch: schedule: - cron: "00 18 * * *" - # push: - # branches: - # - main - # pull_request: - # branches: - # - main - + push: + branches: + - main + pull_request: + branches: + - main jobs: linkChecker: runs-on: ubuntu-latest @@ -20,16 +19,26 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Link Checker - id: lychee + - name: Link Checker (CI strict) + if: github.event_name != 'schedule' + id: lychee_strict + uses: lycheeverse/lychee-action@v2 + with: + args: --verbose --no-progress --root-dir ${{ github.workspace }} --exclude '\$\{slug\}' --exclude '%7Bslug%7D' 'web/**/*.jsx' './**/*.md' './quality-tools/**/*.json' + fail: true + + - name: Link Checker (scheduled report) + if: github.event_name == 'schedule' + id: lychee_schedule uses: lycheeverse/lychee-action@v2 with: + args: --verbose --no-progress --root-dir ${{ github.workspace }} --exclude '\$\{slug\}' --exclude '%7Bslug%7D' 'web/**/*.jsx' './**/*.md' './quality-tools/**/*.json' fail: false - name: Create Issue From File - if: steps.lychee.outputs.exit_code != 0 - uses: peter-evans/create-issue-from-file@v6 + if: github.event_name == 'schedule' && steps.lychee_schedule.outputs.exit_code != 0 + uses: peter-evans/create-issue-from-file@v5 with: title: Link Checker Report content-filepath: ./lychee/out.md - labels: report, automated issue \ No newline at end of file + labels: report, automated issue