@@ -10,32 +10,53 @@ permissions:
1010 id-token : write
1111
1212jobs :
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/[email protected] # 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 :
1436 name : Build client docs
1537 runs-on : windows-latest
1638 steps :
1739 - uses : actions/checkout@v4
1840
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
2148
2249 - name : Run script to build the documentation
2350 working-directory : ./unity/Documentation
2451 run : ./scripts/build.cmd
2552
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
3153 - uses : actions/upload-artifact@v4
3254 with :
3355 name : client-docs
34- path : ./unity/Documentation/clientHTMLOutput
56+ path : ./website/docs/client
3557
3658 build-server-docs :
3759 name : Build server docs
38- needs : build-client-docs-as-artifact
3960 runs-on : ubuntu-latest
4061 steps :
4162 - uses : actions/checkout@v4
@@ -44,12 +65,12 @@ jobs:
4465 id : install_python
4566 uses : actions/setup-python@v5
4667 with :
47- python-version : " 3.10 "
68+ python-version : " 3.12 "
4869
4970 - name : Install Poetry
5071 uses : abatilo/actions-poetry@v2
5172 with :
52- poetry-version : " 1.8.3 "
73+ poetry-version : " 1.8.4 "
5374
5475 - name : Setup a local virtual environment (if no poetry.toml file)
5576 working-directory : ./python
6182 uses : actions/cache/restore@v4
6283 with :
6384 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') }}
6589
6690 - name : Install docs dependencies
6791 working-directory : ./python
@@ -70,35 +94,36 @@ jobs:
7094 echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
7195 echo "VIRTUAL_ENV=$(poetry env info --path)/bin" >> $GITHUB_ENV
7296
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-
7997 - name : Build the documentation
8098 working-directory : ./python
8199 run : python tools/make_docs_cli.py
82100
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
87117
88- # Get client docs to use as part of pages artifact
89118 - uses : actions/download-artifact@v4
90119 with :
91120 name : client-docs
92121 path : ./website/docs/client
93122
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
102127
103128 - uses : actions/upload-pages-artifact@v3
104129 with :
@@ -107,7 +132,7 @@ jobs:
107132 # Single deploy job since we're just deploying
108133 deploy-website :
109134 name : Deploy website
110- needs : build-server-docs
135+ needs : upload-website
111136 runs-on : ubuntu-latest
112137 permissions :
113138 pages : write
0 commit comments