@@ -2,54 +2,17 @@ name: CI
22
33on :
44 push :
5- branches : [ master ]
5+ branches : [ staging ]
66 pull_request :
7- branches : [ master ]
7+ branches : [ staging ]
88
99jobs :
1010
1111 build :
12- name : Build and verify
12+ name : Build and validate
1313 runs-on : ubuntu-20.04
1414 steps :
1515 - name : Check out code
1616 uses : actions/checkout@v2
17- - name : Set Hugo vesrion
18- id : hugo-version
19- run : |
20- HUGO_VERSION=$(grep '^HUGO_VERSION' Makefile | awk -F '=' '{ gsub(" ", "", $2); print $2}')
21- echo "::set-output name=HUGO_VERSION::${HUGO_VERSION}"
22- - name : Setup Hugo
23- uses : peaceiris/actions-hugo@v2
24- with :
25- hugo-version : ' ${{ steps.hugo-version.outputs.HUGO_VERSION }}'
26- - name : Setup Ruby
27- uses : ruby/setup-ruby@v1
28- with :
29- ruby-version : 2.7
30- - name : Build
31- run : make build
32- - name : Verify
33- run : |
34- gem install html-proofer
35- # Ignore hash anchors. These anchors go nowhere. I don't know why this is ignored.
36- # They are in the original PoC, so there must be a reason: https://github.com/kiali/kiali.io/pull/227
37- URL_IGNORE='#'
38- # Ignore some links to Kiali repositories. These are ignored because there are lots of links
39- # to Kiali repositories and, because of that, the checker reaches the max GitHub request limit and
40- # we got throttled. As a result, errors can be issued because of 429 HTTP error codes.
41- # So, we ignore some URLs that are probably safe to ignore:
42- # 1. URLs to specific pulls; i.e. of the form https://github.com/kiali/kiali/pull/1234
43- # 2. URLs to specific issues; i.e. of the form https://github.com/kiali/kiali/issues/1234
44- # 3. URLs to a folder in repository in a branch; i.e. of the form https://github.com/kiali/kiali/tree/v1.24/whatever
45- # - We only ignore links to branches, because it's so-so stable. Master branch
46- # is unsafe because files are moved, renamed, etc.
47- # 4. URLs to a folder in repository in a branch; i.e. of the form https://github.com/kiali/kiali/blob/v1.24/whatever
48- # - Same reasoning as previous point.
49- URL_IGNORE="$URL_IGNORE,/^https:\/\/github.com\/kiali\/kiali\/pull\/\d+/"
50- URL_IGNORE="$URL_IGNORE,/^https:\/\/github.com\/kiali\/kiali\/issues\/\d+/"
51- URL_IGNORE="$URL_IGNORE,/^https:\/\/github.com\/kiali\/kiali\/tree\/v\d+\.\d+\//"
52- URL_IGNORE="$URL_IGNORE,/^https:\/\/github.com\/kiali\/kiali\/blob\/v\d+\.\d+\//"
53- URL_IGNORE="$URL_IGNORE,/.*web.libera.chat.*/"
54- htmlproofer --assume-extension --check-external-hash --empty_alt_ignore --url-ignore "$URL_IGNORE" ./public
55-
17+ - name : Validate
18+ run : make validate-site
0 commit comments