Skip to content

Commit

Permalink
chore: fixes broken URL logic (#1694) (#1696)
Browse files Browse the repository at this point in the history
(cherry picked from commit 44c9d0e)

Co-authored-by: Karl Cardenas <[email protected]>
  • Loading branch information
1 parent 959712b commit e00a551
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/url-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on:
schedule:
# Every Monday at 6 am
- cron: '0 6 * * 1'
workflow_dispatch:


concurrency:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ pdf: ## Generate PDF from docs

verify-url-links: ## Check for broken URLs in production
rm link_report.csv || echo "No report exists. Proceeding to scan step"
npx linkinator https://docs.spectrocloud.com/ --recurse --timeout 60000 --retry --retry-errors-count 3 --skip "^http(?!.*spectrocloud\\.com).*$"" --format csv > temp_report.csv && sleep 2
npx linkinator https://docs.spectrocloud.com/ --recurse --timeout 60000 --retry --retry-errors-count 3 --skip "^http(?!.*spectrocloud\\.com).*$"" --skip "^https:\/\/docs\.spectrocloud\.com\/.*\/supplemental\-packs$"" --format csv > temp_report.csv && sleep 2
grep -E '^[^,]*,[[:space:]]*([4-9][0-9]{2}|[0-9]{4,}),' temp_report.csv > link_report.csv && rm temp_report.csv


verify-url-links-ci: ## Check for broken URLs in production
rm link_report.json || echo "No report exists. Proceeding to scan step"
npx linkinator https://docs.spectrocloud.com/ --recurse --timeout 60000 --retry --retry-errors-count 3 --skip "^http(?!.*spectrocloud\\.com).*$"" --format json > temp_report.json
npx linkinator https://docs.spectrocloud.com/ --recurse --timeout 60000 --retry --retry-errors-count 3 --skip '^http(?!.*software-private.spectrocloud\\.com).*$'' --skip ^http(?!.*spectrocloud\\.com).*$"" --format json > temp_report.json
jq 'del(.links[] | select(.status <= 200))' temp_report.json > link_report.json
rm temp_report.json
mv link_report.json scripts/
Expand Down

0 comments on commit e00a551

Please sign in to comment.