External Links #59
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: External Links | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "40 00 24 * *" | |
jobs: | |
Links: | |
runs-on: ubuntu-latest | |
env: | |
USER_AGENT: Mozilla/5.0 (Linux; Android 13; SM-A725F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Mobile Safari/537.36 | |
steps: | |
- name: Download prod build | |
uses: dawidd6/action-download-artifact@master | |
with: | |
workflow: build.yaml | |
branch: main | |
name: github-pages | |
path: prod | |
- name: Extract prod | |
run: | | |
cd $GITHUB_WORKSPACE/prod | |
tar -xf artifact.tar && rm artifact.tar | |
- name: git clone main | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
path: main | |
- name: install rename | |
run: sudo apt-get install -y rename | |
- name: rename *.md *.txt | |
run: | | |
cd $GITHUB_WORKSPACE/main | |
find . -name "*.md" -exec rename 's/\.md$/.txt/' {} + | |
- name: lychee main/_content prod/(^content) | |
id: lychee | |
uses: lycheeverse/[email protected] | |
with: | |
lycheeVersion: '0.12.0' | |
args: --user-agent "${{ env.USER_AGENT }}" --base=https://buddhistuniversity.net --exclude-link-local --timeout=30 --retry-wait-time=3 --max-redirects=8 --exclude=researchgate.net --exclude=illeakyw.sirv.com --exclude=googleapis.com --exclude=google.com --exclude=accesstoinsight.org --exclude=suttacentral.net --exclude=dhammawheel.com --exclude=github.com --exclude=openlibrary.org --exclude=google-analytics.com --exclude=worldcat.org --exclude=tinyletter.com --exclude=schema.org --exclude=gstatic.com --exclude-mail --verbose --no-progress --cache --exclude-path=prod/content 'prod/**/*.html' 'main/_content/*/*.txt' prod/site.webmanifest prod/browserconfig.xml | |
- name: Create GitHub Issue | |
uses: peter-evans/create-issue-from-file@v4 | |
with: | |
title: Monthly Broken Link Report | |
content-filepath: ./lychee/out.md | |