-
Notifications
You must be signed in to change notification settings - Fork 158
38 lines (35 loc) · 1.1 KB
/
link-checker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Link Checker
on:
pull_request:
jobs:
link-checker:
runs-on: ubuntu-latest
steps:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.92.1'
extended: true
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0
- name: Check broken links
run: |
base_branch=$(jq -r ".pull_request.base.ref" "$GITHUB_EVENT_PATH")
commit_before_pull_request=$(git merge-base origin/$base_branch HEAD)
echo "Base PR commit: $commit_before_pull_request"
cd tyk-docs && bash ../scripts/urlcheck.sh $commit_before_pull_request
- uses: actions/upload-artifact@v3
if: always()
with:
name: urlcheck-new
path: /tmp/urlcheck.new.json
- uses: actions/upload-artifact@v3
if: always()
with:
name: urlcheck-prev
path: /tmp/urlcheck.prev.json
# - name: Setup upterm session
# if: always()
# uses: lhotari/action-upterm@v1