diff --git a/.github/workflows/check-links.yaml b/.github/workflows/check-links.yaml index 757918f..24706d8 100644 --- a/.github/workflows/check-links.yaml +++ b/.github/workflows/check-links.yaml @@ -2,16 +2,29 @@ name: Check Markdown links on: workflow_dispatch: - push: pull_request: schedule: - cron: "0 0 1 * *" jobs: - markdown-link-check: + markdown-link-check-pr: + if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + config-file: '.github/mlc_config.json' + check-modified-files-only: 'yes' + base-branch: 'main' + + markdown-link-check-full: + if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: config-file: '.github/mlc_config.json'