Skip to content

Commit

Permalink
Split local and external links check
Browse files Browse the repository at this point in the history
  • Loading branch information
moisseev committed May 10, 2024
1 parent 12a9e19 commit ee5497b
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- run: ./node_modules/.bin/eslint ./
- run: ./node_modules/.bin/stylelint ./**/*.css ./**/*.html ./**/*.js

build-and-check-links:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -22,14 +22,37 @@ jobs:
mkdir -p _site-root
ln -s ../_site/ _site-root/${{ github.event.repository.name }}
- name: Check broken links
local-links-check:
runs-on: ubuntu-latest
needs: build
steps:
- name: Check broken local links
uses: ruzickap/action-my-broken-link-checker@v2
with:
url: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}
pages_path: ./_site-root/
cmd_params: >
--buffer-size=8192 --color=always --skip-tls-verification
--include="^https://${{ github.repository_owner }}[.]github[.]io/${{ github.event.repository.name }}/"
# --include="^https://rspamd[.]com/${{ github.event.repository.name }}/"
--exclude="^https://github[.]com/rspamd/rspamd[.]com/edit/master/"
--exclude="^https://${{ github.repository_owner }}[.]github[.]io/${{ github.event.repository.name }}/(doc/lua/((lua|rspamd)_.+|ucl)[.]html(#.+)?|.*#top)$"
# --exclude="^https://rspamd[.]com/${{ github.event.repository.name }}/."
debug: true

external-links-check:
runs-on: ubuntu-latest
needs: build
steps:
- name: Check broken external links
uses: ruzickap/action-my-broken-link-checker@v2
with:
url: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}
pages_path: ./_site-root/
cmd_params: >
--buffer-size=8192 --max-connections=10 --color=always --skip-tls-verification
--exclude="^https://${{ github.repository_owner }}[.]github[.]io/${{ github.event.repository.name }}/"
--exclude="^https://rspamd[.]com/${{ github.event.repository.name }}/"
--exclude="^https://github[.]com/rspamd/rspamd[.]com/edit/master/"
--exclude="^https://${{ github.repository_owner }}[.]github[.]io/${{ github.event.repository.name }}/(doc/lua/((lua|rspamd)_.+|ucl)[.]html|.+[.]html#top)$"
--exclude="^https://rspamd[.]com/${{ github.event.repository.name }}/."
debug: true

0 comments on commit ee5497b

Please sign in to comment.