Last active
February 2, 2020 09:16
-
-
Save ruzickap/14a389171332517a4f1b717cc3fe2440 to your computer and use it in GitHub Desktop.
Automatically check links on web pages
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
git clone git@github.com:ruzickap/check_urls.git | |
cd check_urls | |
mkdir -p .github/workflows | |
cat > .github/workflows/periodic-broken-link-checks.yml << \EOF | |
name: periodic-broken-link-checks | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
pull_request: | |
types: [opened, synchronize] | |
paths: | |
- .github/workflows/periodic-broken-link-checks.yml | |
push: | |
branches: | |
- master | |
paths: | |
- .github/workflows/periodic-broken-link-checks.yml | |
jobs: | |
broken-link-checker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Broken link checker | |
env: | |
INPUT_URL: https://google.com | |
EXCLUDE: | | |
linkedin.com | |
localhost | |
myexample.dev | |
mylabs.dev | |
run: | | |
export INPUT_CMD_PARAMS="--one-page-only --verbose --buffer-size=8192 --concurrency=10 --exclude=($( echo ${EXCLUDE} | tr ' ' '|' ))" | |
wget -qO- https://raw.githubusercontent.com/ruzickap/action-my-broken-link-checker/v1/entrypoint.sh | bash | |
EOF | |
git add . | |
git commit -m "Add periodic-broken-link-checks" | |
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment