File tree 2 files changed +15
-7
lines changed
2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 16
16
description : " URL to be checked (e.g.: blog/)"
17
17
required : false
18
18
19
- permissions :
20
- contents : write
21
-
22
19
env :
23
20
URL : " "
24
21
@@ -53,10 +50,24 @@ jobs:
53
50
run : |
54
51
npm install -g purgecss
55
52
purgecss -c purgecss.config.js
53
+ - name : Get Chromium version 🌐
54
+ # https://github.com/GoogleChromeLabs/chrome-for-testing?tab=readme-ov-file#other-api-endpoints
55
+ run : |
56
+ CHROMIUM_VERSION=$(wget -qO- https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_STABLE | cut -d. -f1)
57
+ echo "Chromium version: $CHROMIUM_VERSION"
58
+ echo "CHROMIUM_VERSION=$CHROMIUM_VERSION" >> $GITHUB_ENV
59
+ - name : Setup Chrome 🌐
60
+ id : setup-chrome
61
+ uses : browser-actions/setup-chrome@v1
62
+ with :
63
+ chrome-version : ${{ env.CHROMIUM_VERSION }}
64
+ - name : Install chromedriver 🚗
65
+ run : |
66
+ npm install -g chromedriver@$CHROMIUM_VERSION
56
67
- name : Run axe 🪓
57
68
# https://github.com/dequelabs/axe-core-npm/tree/develop/packages/cli
58
69
run : |
59
70
npm install -g @axe-core/cli
60
71
npm install -g http-server
61
72
http-server _site/ &
62
- axe http://localhost:8080/${{ github.event.inputs.url || env.URL }} --load-delay=1500 --exit
73
+ axe --chromedriver-path $(npm root -g)/chromedriver/bin/chromedriver http://localhost:8080/${{ github.event.inputs.url || env.URL }} --load-delay=1500 --exit
Original file line number Diff line number Diff line change 5
5
workflows : [Deploy site]
6
6
types : [completed]
7
7
8
- permissions :
9
- contents : write
10
-
11
8
jobs :
12
9
check-links-on-site :
13
10
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
You can’t perform that action at this time.
0 commit comments