Add nix support #12
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: Check URL's with Lychee | |
on: | |
pull_request: | |
branches: [main] | |
paths: | |
- '**.adoc' | |
- '**.md' | |
- '**.nix' | |
- .github/workflows/link-checker.yml | |
- flake.lock | |
- lychee.toml | |
push: | |
branches: | |
- main | |
paths: | |
- '**.adoc' | |
- '**.md' | |
- '**.nix' | |
- .github/workflows/link-checker.yml | |
- flake.lock | |
- lychee.toml | |
schedule: | |
# Run once a month on the 14th | |
- cron: 0 0 14 * * | |
workflow_dispatch: | |
jobs: | |
link-checker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v14 | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Restore lychee cache | |
id: cache-lychee-restore | |
uses: actions/cache/restore@v4 | |
with: | |
key: lychee-cache | |
path: .lycheecache | |
- name: Convert the Asciidoc files to html | |
run: nix develop --command asciidoctor ./*.adoc | |
- name: Run lychee on the generated site | |
env: | |
GITHUB_TOKEN: $${{ secrets.GITHUB_TOKEN}} | |
run: nix develop --command lychee --cache --no-progress --verbose ./*.html |