-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (44 loc) · 1.19 KB
/
link-check.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
43
44
45
46
47
48
49
50
name: Validate HTML Links
on:
push:
branches:
- main
pull_request:
#jobs:
# link-check:
# runs-on: ubuntu-latest
#
# steps:
# # Step 1: Check out the repository
# - name: Checkout Code
# uses: actions/checkout@v3
#
# # Step 2: Install a static file server and the link checker
# - name: Install Tools
# run: |
# sudo npm install -g http-server
# sudo npm install -g broken-link-checker
#
# # Step 3: Serve the file locally
# - name: Serve the Site
# run: http-server ./docs -p 8080 &
#
# # Step 4: Run Link Checker
# - name: Run HTML Link Checker
# run: blc http://127.0.0.1:8080/index.html --recursive --verbose
jobs:
link-check:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository
- name: Checkout Code
uses: actions/checkout@v3
# Step 2: Install Ruby and html-proofer
- name: Install Ruby and HTMLProofer
run: |
sudo apt-get update
sudo apt-get install -y ruby-full
gem install html-proofer
# Step 3: Run HTML Link Checker
- name: Run HTMLProofer
run: htmlproofer ./docs --disable-external