@@ -10,32 +10,53 @@ permissions:
10
10
id-token : write
11
11
12
12
jobs :
13
- build-client-docs-as-artifact :
13
+ build-protos-docs :
14
+ name : Build protos docs
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+
19
+ - name : Install Buf CLI
20
+ uses : bufbuild/buf-setup-action@v1.47.2 # must match mise.toml
21
+ with :
22
+ github_token : ${{ secrets.GITHUB_TOKEN }}
23
+
24
+ - name : Install protoc
25
+ uses : arduino/setup-protoc@v1
26
+
27
+ - name : Build protos docs
28
+ run : buf generate
29
+
30
+ - uses : actions/upload-artifact@v4
31
+ with :
32
+ name : protos-docs
33
+ path : ./website/docs/protos
34
+
35
+ build-client-docs :
14
36
name : Build client docs
15
37
runs-on : windows-latest
16
38
steps :
17
39
- uses : actions/checkout@v4
18
40
19
- - name : Install docfx
20
- run : dotnet tool install -g docfx
41
+ - name : Dotnet Setup
42
+ uses : actions/setup-dotnet@v3
43
+ with :
44
+ dotnet-version : 8.x
45
+
46
+ - name : Update docfx
47
+ run : dotnet tool update -g docfx
21
48
22
49
- name : Run script to build the documentation
23
50
working-directory : ./unity/Documentation
24
51
run : ./scripts/build.cmd
25
52
26
- # - name: Move docs to website directory
27
- # run: |
28
- # mkdir -p ./website/docs/client/
29
- # cp -r ./unity/Documentation/clientHTMLOutput/* ./website/docs/client/
30
- # Upload the website directory as an artifact
31
53
- uses : actions/upload-artifact@v4
32
54
with :
33
55
name : client-docs
34
- path : ./unity/Documentation/clientHTMLOutput
56
+ path : ./website/docs/client
35
57
36
58
build-server-docs :
37
59
name : Build server docs
38
- needs : build-client-docs-as-artifact
39
60
runs-on : ubuntu-latest
40
61
steps :
41
62
- uses : actions/checkout@v4
@@ -44,12 +65,12 @@ jobs:
44
65
id : install_python
45
66
uses : actions/setup-python@v5
46
67
with :
47
- python-version : " 3.10 "
68
+ python-version : " 3.12 "
48
69
49
70
- name : Install Poetry
50
71
uses : abatilo/actions-poetry@v2
51
72
with :
52
- poetry-version : " 1.8.3 "
73
+ poetry-version : " 1.8.4 "
53
74
54
75
- name : Setup a local virtual environment (if no poetry.toml file)
55
76
working-directory : ./python
61
82
uses : actions/cache/restore@v4
62
83
with :
63
84
path : ./python/.venv
64
- key : venv-${{ runner.os }}-${{ steps.install_python.outputs.python-version }}-${{ hashFiles('./python/poetry.lock') }}
85
+ key :
86
+ venv-${{ runner.os }}-${{
87
+ steps.install_python.outputs.python-version }}-${{
88
+ hashFiles('./python/poetry.lock') }}
65
89
66
90
- name : Install docs dependencies
67
91
working-directory : ./python
@@ -70,35 +94,36 @@ jobs:
70
94
echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
71
95
echo "VIRTUAL_ENV=$(poetry env info --path)/bin" >> $GITHUB_ENV
72
96
73
- # - name: Saved cached virtualenv
74
- # uses: actions/cache/save@v4
75
- # with:
76
- # path: ./python/.venv
77
- # key: venv-${{ runner.os }}-${{ steps.install_python.outputs.python-version }}-${{ hashFiles('./python/poetry.lock') }}
78
-
79
97
- name : Build the documentation
80
98
working-directory : ./python
81
99
run : python tools/make_docs_cli.py
82
100
83
- - name : Move docs to website directory
84
- run : |
85
- mkdir -p ./website/docs/server/
86
- cp -r ./python/docs/* ./website/docs/server/
101
+ - uses : actions/upload-artifact@v4
102
+ with :
103
+ name : server-docs
104
+ path : ./website/docs/server
105
+
106
+ upload-website :
107
+ name : Upload website
108
+ needs : [build-protos-docs, build-client-docs, build-server-docs]
109
+ runs-on : ubuntu-latest
110
+ steps :
111
+ - uses : actions/checkout@v4
112
+
113
+ - uses : actions/download-artifact@v4
114
+ with :
115
+ name : protos-docs
116
+ path : ./website/docs/protos
87
117
88
- # Get client docs to use as part of pages artifact
89
118
- uses : actions/download-artifact@v4
90
119
with :
91
120
name : client-docs
92
121
path : ./website/docs/client
93
122
94
- # # cleanup client docs artifacts
95
- # - name: Delete client docs artifact
96
- # run: |
97
- # github.rest.actions.deleteArtifact({
98
- # owner: context.repo.owner,
99
- # repo: context.repo.repo,
100
- # artifact_id: ${{ steps.artifact-download.outputs.artifact-id }}
101
- # });
123
+ - uses : actions/download-artifact@v4
124
+ with :
125
+ name : server-docs
126
+ path : ./website/docs/server
102
127
103
128
- uses : actions/upload-pages-artifact@v3
104
129
with :
@@ -107,7 +132,7 @@ jobs:
107
132
# Single deploy job since we're just deploying
108
133
deploy-website :
109
134
name : Deploy website
110
- needs : build-server-docs
135
+ needs : upload-website
111
136
runs-on : ubuntu-latest
112
137
permissions :
113
138
pages : write
0 commit comments