@@ -2,13 +2,13 @@ name: Hugo Docs
22on :
33 push :
44 branches :
5- - " master"
5+ - " master"
66 pull_request :
77 branches :
8- - " master"
8+ - " master"
99 paths :
10- - ' docs/site/**'
11- - ' tools/make/docs.mk'
10+ - " docs/site/**"
11+ - " tools/make/docs.mk"
1212
1313permissions :
1414 contents : read
@@ -17,63 +17,64 @@ jobs:
1717 docs-lint :
1818 runs-on : ubuntu-22.04
1919 steps :
20- - name : Check out code
21- uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
22- with :
23- ref : ${{ github.event.pull_request.head.sha }}
20+ - name : Check out code
21+ uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
22+ with :
23+ ref : ${{ github.event.pull_request.head.sha }}
2424
25- - uses : ./tools/github-actions/setup-deps
25+ - uses : ./tools/github-actions/setup-deps
2626
27- - name : Run markdown linter
28- uses : nosborn/github-action-markdown-cli@9b5e871c11cc0649c5ac2526af22e23525fa344d # v3.3.0
29- with :
30- files : docs/site/content/*
31- config_file : " .github/markdown_lint_config.json"
27+ - name : Run markdown linter
28+ uses : nosborn/github-action-markdown-cli@9b5e871c11cc0649c5ac2526af22e23525fa344d # v3.3.0
29+ with :
30+ files : docs/site/content/*
31+ config_file : " .github/markdown_lint_config.json"
3232
33- - name : Install linkinator
34- run :
npm install -g [email protected] 33+ - name : Install linkinator
34+ run :
npm install -g [email protected] 3535
36- - name : Check links
37- run : make docs # docs-check-links
36+ - name : Check links
37+ run : make docs # docs-check-links
3838
3939 docs-build :
4040 runs-on : ubuntu-latest
4141 needs : docs-lint
4242 permissions :
4343 contents : write
4444 steps :
45- - name : Git checkout
46- uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
47- with :
48- submodules : true
49- ref : ${{ github.event.pull_request.head.sha }}
50-
51- - uses : ./tools/github-actions/setup-deps
52-
53- - name : Setup Hugo
54- uses : peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
55- with :
56- hugo-version : ' latest'
57- extended : true
58-
59- - name : Setup Node
60- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.1.0
61- with :
62- node-version : ' 18'
63-
64- - name : Install Site Dependencies and Build Site
65- run : |
66- cp docs/api-testing-schema.json docs/site/static/api-testing-schema.json
67- make docs # docs-check-links
68-
69- # Upload docs for GitHub Pages
70- - name : Upload GitHub Pages artifact
71- uses : actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
72- with :
73- # Path of the directory containing the static assets.
74- path : docs/site/public
75- # Duration after which artifact will expire in days.
76- # retention-days: # optional, default is 1
45+ - name : Git checkout
46+ uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
47+ with :
48+ submodules : true
49+ ref : ${{ github.event.pull_request.head.sha }}
50+
51+ - uses : ./tools/github-actions/setup-deps
52+
53+ - name : Setup Hugo
54+ uses : peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
55+ with :
56+ hugo-version : " latest"
57+ extended : true
58+
59+ - name : Setup Node
60+ uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.1.0
61+ with :
62+ node-version : " 18"
63+
64+ - name : Install Site Dependencies and Build Site
65+ run : |
66+ cp docs/api-testing-schema.json docs/site/static/api-testing-schema.json
67+ cp docs/api-testing-mock-schema.json docs/site/static/api-testing-mock-schema.json
68+ make docs # docs-check-links
69+
70+ # Upload docs for GitHub Pages
71+ - name : Upload GitHub Pages artifact
72+ uses : actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
73+ with :
74+ # Path of the directory containing the static assets.
75+ path : docs/site/public
76+ # Duration after which artifact will expire in days.
77+ # retention-days: # optional, default is 1
7778
7879 # This workflow contains a single job called "build"
7980 docs-publish :
@@ -83,16 +84,16 @@ jobs:
8384
8485 # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
8586 permissions :
86- pages : write # to deploy to Pages
87+ pages : write # to deploy to Pages
8788 deployments : write
88- id-token : write # to verify the deployment originates from an appropriate source
89+ id-token : write # to verify the deployment originates from an appropriate source
8990
9091 # Deploy to the github-pages environment
9192 environment :
9293 name : github-pages
9394 url : ${{ steps.deployment.outputs.page_url }}
9495
9596 steps :
96- - name : Deploy to GitHub Pages
97- id : deployment
98- uses : actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
97+ - name : Deploy to GitHub Pages
98+ id : deployment
99+ uses : actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
0 commit comments