External Links #73
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 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 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@v4 | |
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/lychee-action@v2 | |
with: | |
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=apple.com --exclude=menzelphoto.com --exclude=accesstoinsight.org --exclude=suttacentral.net --exclude=dhammawheel.com --exclude=doi.org --exclude=archive.org --exclude=github.com --exclude=google-analytics.com --exclude=worldcat.org --exclude=ssrn.com --exclude=schema.org --exclude=substack.com --exclude=science.org --exclude=pnas.org --exclude=tandfonline.com --exclude=archive.is --exclude=wiley.com --exclude=gstatic.com --exclude=cell.com --exclude=jstore.org --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@v5 | |
with: | |
title: Monthly Broken Link Report | |
token: ${{ secrets.BUILD_ACTION_TOKEN }} | |
content-filepath: ./lychee/out.md | |