diff --git a/.github/workflows/check_links.yml b/.github/workflows/check_links.yml index 6327e567..edfa4988 100644 --- a/.github/workflows/check_links.yml +++ b/.github/workflows/check_links.yml @@ -23,13 +23,34 @@ jobs: with: output: ./lychee/out.md + # See exclusions in .lycheeignore, remove lines and give it a + # whirl if you're hunting broken links + - name: Check links + id: lychee + uses: lycheeverse/lychee-action@master + with: + fail: true + # We need to exclude the cf-conventions-1.2 and .3 build dirs + # because they lead to an error of: + # Error: Cannot read input content from file + # Caused by: + # stream did not contain valid UTF-8 + # Note: --exclude-path only takes one input path, so we need + # to set it twice. + # Note also we define a .lycheeignore file to exclude some + # specific links for checking, instead of using --exclude. + args: > + --no-progress './*.md' + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Upload report - if: ${{ always() }} + if: env.exit_code != 0 uses: actions/upload-artifact@v1 with: name: Link check report path: ./lychee/out.md - + - name: Create Issue From File uses: peter-evans/create-issue-from-file@v5.0.0 with: diff --git a/.lycheeignore b/.lycheeignore new file mode 100644 index 00000000..1bc8e830 --- /dev/null +++ b/.lycheeignore @@ -0,0 +1,3 @@ +cfeditor.ceda.ac.uk +wps-web1.ceda.ac.uk +http://kitt.llnl.gov/trac/wiki/SatelliteData diff --git a/constitution.md b/constitution.md index 1ed286a1..c13258dc 100644 --- a/constitution.md +++ b/constitution.md @@ -100,4 +100,4 @@ The standard names committee will make proposals for modification of conventions The membership of the standard names committee should include representatives of the various scientific user communities of the CF standard. -[code-of-conduct]: https://github.com/cf-convention/cf-conventions/blob/main/CODE_OF_CONDUCT.md +[code-of-conduct]: https://github.com/cf-convention/cf-conventions/blob/main/CODE_OF_CONDUCT.md "Code of Conduct"