check-broken-links #324
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: check-broken-links | |
on: | |
schedule: | |
- cron: "8 8 * * 0" | |
pull_request: | |
types: [opened, synchronize] | |
paths: | |
- .github/workflows/check-broken-links.yml | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/check-broken-links.yml | |
permissions: read-all | |
jobs: | |
my-broken-link-checker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- name: Check - container | |
# Unpinned Actions Full Length Commit SHA | |
# kics-scan ignore-line | |
uses: ./ | |
with: | |
url: https://rust-lang.github.io/mdBook/ | |
cmd_params: --verbose --color=always --ignore-fragments --one-page-only --buffer-size=8192 | |
- name: Check - simple | |
env: | |
INPUT_URL: https://rust-lang.github.io/mdBook/ | |
INPUT_CMD_PARAMS: --verbose --color=always --ignore-fragments --one-page-only --buffer-size=8192 | |
run: ./entrypoint.sh | |
- name: Check - simple - local pages | |
env: | |
INPUT_URL: https://my-testing-domain.com | |
INPUT_PAGES_PATH: ./tests/ | |
INPUT_CMD_PARAMS: --skip-tls-verification --verbose --color=always --buffer-size=8192 | |
run: ./entrypoint.sh | |
build-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- name: Create web page | |
run: | | |
mkdir -v public | |
cat > public/index.html << EOF | |
<!DOCTYPE html> | |
<html> | |
<head> | |
My page which will be stored on my-testing-domain.com domain | |
</head> | |
<body> | |
Links: | |
<ul> | |
<li><a href="https://my-testing-domain.com">https://my-testing-domain.com</a></li> | |
<li><a href="https://my-testing-domain.com:443">https://my-testing-domain.com:443</a></li> | |
</ul> | |
</body> | |
</html> | |
EOF | |
- name: Check links using script | |
env: | |
INPUT_URL: https://my-testing-domain.com | |
INPUT_PAGES_PATH: ./public/ | |
INPUT_CMD_PARAMS: --skip-tls-verification --verbose --color=always --buffer-size=8192 | |
INPUT_DEBUG: true | |
run: ./entrypoint.sh | |
- name: Check links using container | |
# kics-scan ignore-line | |
uses: ./ | |
with: | |
url: https://my-testing-domain.com | |
pages_path: ./public/ | |
cmd_params: --skip-tls-verification --verbose --color=always --buffer-size=8192 | |
debug: true |