Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(linkcheck): use github action instead of downloading tar, and ignore connection failures for cron-based workflow #1676

Merged
merged 4 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,10 @@ jobs:
with:
url: "http://${{ env.container_ip }}:8080/"
- name: Check internal links
# disable action until https://github.com/tylerbutler/linkcheck-bin/issues/1 is released
#uses: filiph/[email protected]
#with:
# arguments: '-i sitemap.prod.txt'
run: |
curl -sL https://github.com/filiph/linkcheck/releases/download/2.0.20/linkcheck-2.0.20-linux-x64.tar.gz | tar xvzf - linkcheck/linkcheck --strip 1
# Check links from production sitemap to ensure no publish links are broken
./linkcheck -i sitemap.prod.txt
# Check links from other products to ensure no links are broken
./linkcheck -i product-links.prod.txt
uses: filiph/[email protected]
with:
arguments: "-i sitemap.prod.txt"
- name: Check product links
uses: filiph/[email protected]
with:
arguments: "-i product-links.prod.txt"
19 changes: 8 additions & 11 deletions .github/workflows/linkcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ jobs:
run: curl -sL https://docs.camunda.io/sitemap.xml | grep -oP '<loc>\K.*?(?=</loc>)' | sed "s!https://docs.camunda.io!${{ matrix.url }}!g" > sitemap.prod.txt
- name: Prepare product links
run: grep 'https://docs.camunda.io' product-links.txt | sed "s!https://docs.camunda.io!${{ matrix.url }}!g" > product-links.prod.txt
# disable action until https://github.com/tylerbutler/linkcheck-bin/issues/1 is released
#uses: filiph/[email protected]
#with:
# arguments: '-i sitemap.prod.txt'
- name: Check internal links from sitemap
run: |
curl -sL https://github.com/filiph/linkcheck/releases/download/2.0.20/linkcheck-2.0.20-linux-x64.tar.gz | tar xvzf - linkcheck/linkcheck --strip 1
# Check links from production sitemap to ensure no publish links are broken
./linkcheck -i sitemap.prod.txt
# Check links from other products to ensure no links are broken
./linkcheck -i product-links.prod.txt
- name: Check internal links
uses: filiph/[email protected]
with:
arguments: "--connection-failures-as-warnings -i sitemap.prod.txt"
- name: Check product links
uses: filiph/[email protected]
with:
arguments: "--connection-failures-as-warnings -i product-links.prod.txt"