Links #3297
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: Links | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
schedule: | |
- cron: '0 */8 * * *' | |
jobs: | |
links: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: lychee | |
id: lychee | |
uses: lycheeverse/[email protected] | |
continue-on-error: true | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
with: | |
args: '-m 0 -a "200" -t 300 --max-retries 0 --max-concurrency 1 --include-mail --require-https --format markdown -u "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" -- README.html' | |
fail: false # Don't fail action on broken links | |
- name: Links | |
shell: bash | |
run: | | |
if [[ $(cat lychee/out.md | grep -Fe '* [' | grep -vFe '* [429] [https://www.npmjs.com/package/' -e '* [403] [https://www.iconfinder.com/' -e '* [403] [https://www.shutterstock.com/' -e '* [403] [https://www.pixiv.net/' -e '* [ERROR] [https://www.pixiv.net/' -e '* [ERROR] [https://www.adobe.com/]' -e '* [TIMEOUT] [https://www.adobe.com/]' -e '* [TIMEOUT] [https://web.archive.org/web/' -e '* [ERROR] [https://www.npmjs.com/package/' -e '* [408] [https://www.npmjs.com/package/' -e '* [500] [https://www.npmjs.com/package/' -e '* [503] [https://www.npmjs.com/package/' | tee /dev/stderr | head -c1 | wc -c) -ne 0 ]] | |
then exit 1 | |
fi | |
rm -r lychee/ | |
if [[ $(git status --porcelain | tee /dev/stderr | head -c1 | wc -c) -ne 0 || $(git clean -dffx | tee /dev/stderr | head -c1 | wc -c) -ne 0 ]] | |
then exit 1 | |
fi |