Check links #65
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 links | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 2 * * MON | |
permissions: | |
pull-requests: write | |
contents: write | |
jobs: | |
linkcheck: | |
name: Check broken links | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
ocaml-compiler: | |
- "4.14" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use OCaml ${{ matrix.ocaml-compiler }} | |
uses: ocaml/setup-ocaml@v3 | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
dune-cache: ${{ matrix.os != 'macos-latest' }} | |
opam-repositories: | | |
pin: git+https://github.com/ocaml/opam-repository#c45f5bab71d3589f41f9603daca5acad14df0ab0 | |
opam-disable-sandboxing: true | |
- name: Install olinkcheck | |
run: opam install olinkcheck.~dev | |
- name: Annotate broken links | |
run: | | |
opam exec -- olinkcheck --annotate md_with_yaml data/academic_institutions --exclude-list=.github/workflows/exclude.txt | |
opam exec -- olinkcheck --annotate md_with_yaml data/books --exclude-list=.github/workflows/exclude.txt | |
opam exec -- olinkcheck --annotate md_with_yaml data/changelog --exclude-list=.github/workflows/exclude.txt | |
opam exec -- olinkcheck --annotate md_with_yaml data/code_examples --exclude-list=.github/workflows/exclude.txt | |
opam exec -- olinkcheck --annotate md_with_yaml data/industrial_users --exclude-list=.github/workflows/exclude.txt | |
opam exec -- olinkcheck --annotate md_with_yaml data/media --exclude-list=.github/workflows/exclude.txt | |
opam exec -- olinkcheck --annotate md_with_yaml data/news --exclude-list=.github/workflows/exclude.txt | |
opam exec -- olinkcheck --annotate md_with_yaml data/pages --exclude-list=.github/workflows/exclude.txt | |
opam exec -- olinkcheck --annotate md_with_yaml data/problems --exclude-list=.github/workflows/exclude.txt | |
opam exec -- olinkcheck --annotate md_with_yaml data/releases --exclude-list=.github/workflows/exclude.txt | |
opam exec -- olinkcheck --annotate md_with_yaml data/success_stories --exclude-list=.github/workflows/exclude.txt | |
opam exec -- olinkcheck --annotate md_with_yaml data/tutorials --exclude-list=.github/workflows/exclude.txt | |
opam exec -- olinkcheck --annotate md_with_yaml data/workshops --exclude-list=.github/workflows/exclude.txt | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
title: 'Check broken links' | |
branch: 'broken-links' | |
add-paths: | | |
data |