1
- name : Build and Deploy Writerside + CodeLabs
2
-
3
- on :
4
- push :
5
- branches : ["dev"]
6
- workflow_dispatch :
7
-
8
- permissions :
9
- id-token : write
10
- pages : write
11
-
12
- env :
13
- INSTANCE : ' Writerside/modo-docs'
14
- ARTIFACT : ' webHelpMODO-DOCS2-all.zip'
15
- DOCKER_VERSION : ' 241.15989'
16
-
17
1
jobs :
18
2
build :
19
3
runs-on : ubuntu-latest
23
7
with :
24
8
fetch-depth : 0
25
9
26
- # Step to Install claat
10
+ # Install claat tool
27
11
- name : Install claat tool
28
12
run : go install github.com/googlecodelabs/tools/claat@latest
13
+ env :
14
+ GOPATH : ${{ runner.temp }}/go
15
+
16
+ # Ensure claat is in PATH
17
+ - name : Add claat to PATH
18
+ run : echo "${{ runner.temp }}/go/bin" >> $GITHUB_PATH
29
19
30
20
# Step to Generate CodeLab HTML Files
31
21
- name : Generate CodeLabs content
48
38
path : |
49
39
artifacts/${{ env.ARTIFACT }}
50
40
retention-days : 7
51
-
52
- deploy :
53
- environment :
54
- name : github-pages
55
- url : ${{ steps.deployment.outputs.page_url }}
56
- # Requires build job results
57
- needs : build
58
- runs-on : ubuntu-latest
59
-
60
- steps :
61
- - name : Download artifact
62
- uses : actions/download-artifact@v4
63
- with :
64
- name : docs
65
-
66
- - name : Unzip Writerside artifact
67
- run : unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir
68
-
69
- # Inject CodeLab HTML into Writerside docs
70
- - name : Copy CodeLabs to Writerside output
71
- run : cp -R codelabs-generated/* dir/
72
-
73
- - name : Setup Pages
74
-
75
-
76
- - name : Upload artifact
77
-
78
- with :
79
- path : dir
80
-
81
- - name : Deploy to GitHub Pages
82
- id : deployment
83
-
0 commit comments