-
Notifications
You must be signed in to change notification settings - Fork 178
42 lines (38 loc) · 1 KB
/
add_link_checker.yml
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
38
39
40
41
42
name: Link Checker
on:
workflow_dispatch:
inputs:
deployment:
description: 'Select the deployment to check links in'
required: true
default: 'ballerina.io'
type: choice
options:
- ballerina.io
- pre-prod.ballerina.io
- lib.ballerina.io
- staging-lib.ballerina.io
- dev-lib.ballerina.io
- blog.ballerina.io
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- name: Setup node
uses: actions/setup-node@v3
- name: Run link checker
env:
DEPLOYMENT: ${{ inputs.deployment }}
run: |
npm install --global @deptagency/octopus@latest
URL=https://$DEPLOYMENT/
echo "Checking links in $URL"
# Run octopus and catch errors for better logging
set -e
{
octopus $URL
} || {
echo "Error occurred while running octopus"
echo "Debugging info: URL=$URL, Deployment=$DEPLOYMENT"
exit 1
}