Skip to content

Commit

Permalink
Perform link check only when a PR is (re)opened or synchronized. Adde…
Browse files Browse the repository at this point in the history
…d scheduled check every Sunday at 3:07am.
  • Loading branch information
atteggiani committed May 6, 2024
1 parent 5b044ce commit 04b470a
Showing 1 changed file with 11 additions and 20 deletions.
31 changes: 11 additions & 20 deletions .github/workflows/check_links.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,26 @@
name: Check links

on:
push:
schedule:
# Run at 03:07 every Sunday
- cron: "7 3 * * SUN"
pull_request: #Action fires anytime a PR is (re)opened or synchronized
types:
- opened
- reopened
- synchronize
schedule:
# Run every Sunday at 03:07 (AEDT)
# AEDT is UTC+10 --> Sunday at 03:07 AEDT is Saturday at 17:07 UTC
- cron: "7 17 * * SAT"
workflow_dispatch:

jobs:
link-check:
if: ${{ github.event_name != 'schedule' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Checkout repo
uses: actions/checkout@master

- name: Link checker
uses: lycheeverse/[email protected]
with:
fail: true
args: --config .github/workflows/lychee-config.toml './docs/**/*.md' './docs/**/*.html'

# scheduled-link-check:
# if: ${{ github.event_name == 'schedule' }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - uses: gaurav-nelson/github-action-markdown-link-check@v1
# with:
# use-quiet-mode: 'no'
# use-verbose-mode: 'yes'
# config-file: '.github/workflows/mlc_config.json'
# folder-path: 'docs'
# base-branch: 'main'

0 comments on commit 04b470a

Please sign in to comment.