check-broken-links #236
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 | |
jobs: | |
my-broken-link-checker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check - container | |
uses: ./ | |
with: | |
url: https://rust-lang.github.io/mdBook/ | |
cmd_params: --verbose --color=always --ignore-fragments --one-page-only | |
- name: Check - simple | |
env: | |
INPUT_URL: https://rust-lang.github.io/mdBook/ | |
INPUT_CMD_PARAMS: --verbose --color=always --ignore-fragments --one-page-only | |
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 | |
run: | |
./entrypoint.sh | |
build-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 | |
INPUT_DEBUG: true | |
run: ./entrypoint.sh | |
- name: Check links using container | |
uses: ./ | |
with: | |
url: https://my-testing-domain.com | |
pages_path: ./public/ | |
cmd_params: --skip-tls-verification --verbose --color=always | |
debug: true |