aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/check-links.yaml
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-12-25 12:36:35 -0800
committerFranck Cuny <franck@fcuny.net>2024-12-25 12:36:35 -0800
commitb4114dc0d1a5454545382e5ea6690f7fb3c73691 (patch)
treeae710bbdc63f40b3736d57e90e2ac56941c7fe50 /.github/workflows/check-links.yaml
parentadd container security summit notes (diff)
downloadfcuny.net-b4114dc0d1a5454545382e5ea6690f7fb3c73691.tar.gz
Revert "stop using GHA"
This reverts commit ca451c165c8728f63bcacf0b38cd773fe060e076.
Diffstat (limited to '.github/workflows/check-links.yaml')
-rw-r--r--.github/workflows/check-links.yaml38
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/check-links.yaml b/.github/workflows/check-links.yaml
new file mode 100644
index 0000000..ea20952
--- /dev/null
+++ b/.github/workflows/check-links.yaml
@@ -0,0 +1,38 @@
+name: Check links
+on:
+ schedule:
+ - cron: "30 6 * * 0"
+ workflow_dispatch:
+ pull_request:
+ branches:
+ - main
+jobs:
+ lychee:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: DeterminateSystems/nix-installer-action@main
+ - uses: DeterminateSystems/magic-nix-cache-action@main
+ - name: Build the site
+ run: nix build --print-build-logs
+ - name: Restore lychee cache
+ uses: actions/cache@v3
+ with:
+ path: .lycheecache
+ key: cache-lychee-${{ hashFiles('**/*.md') }}
+ restore-keys: cache-lychee-
+ - name: Check links
+ id: lychee
+ uses: lycheeverse/lychee-action@v1
+ with:
+ args: --verbose --no-progress './result/**/*.html'
+ output: ./lycheeresult.md
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Create issue
+ if: ${{ github.event_name != 'pull_request' && env.lychee_exit_code != 0 }}
+ uses: peter-evans/create-issue-from-file@v4
+ with:
+ title: "[lychee] Broken links"
+ content-filepath: ./lycheeresult.md
+ labels: bug, automated issue