Skip to content

Commit dce4366

Browse files
committed
ci: change docfx target from source code to Unity built assemblies
1 parent 88026ab commit dce4366

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

.github/workflows/build-docs.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,38 @@ on:
1111

1212
jobs:
1313
run-docfx:
14+
if: ${{ ((github.event_name == 'push' && github.repository_owner == 'Cysharp') || startsWith(github.event.pull_request.head.label, 'Cysharp:')) && github.triggering_actor != 'dependabot[bot]' }}
1415
permissions:
1516
contents: write
1617
pages: write
1718
runs-on: ubuntu-24.04
1819
timeout-minutes: 10
1920
steps:
21+
- name: Load secrets
22+
id: op-load-secret
23+
uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 # v2.0.0
24+
with:
25+
export-env: false
26+
env:
27+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN_PUBLIC }}
28+
UNITY_EMAIL: "op://${{ vars.OP_VAULT_ACTIONS_PUBLIC }}/UNITY_LICENSE/username"
29+
UNITY_PASSWORD: "op://${{ vars.OP_VAULT_ACTIONS_PUBLIC }}/UNITY_LICENSE/credential"
30+
UNITY_SERIAL: "op://${{ vars.OP_VAULT_ACTIONS_PUBLIC }}/UNITY_LICENSE/serial"
2031
- uses: Cysharp/Actions/.github/actions/checkout@main
32+
# Execute scripts: Export Package
33+
# /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export
34+
- name: Build Unity (.unitypackage)
35+
uses: Cysharp/Actions/.github/actions/unity-builder@main
36+
env:
37+
UNITY_EMAIL: ${{ steps.op-load-secret.outputs.UNITY_EMAIL }}
38+
UNITY_PASSWORD: ${{ steps.op-load-secret.outputs.UNITY_PASSWORD }}
39+
UNITY_SERIAL: ${{ steps.op-load-secret.outputs.UNITY_SERIAL }}
40+
with:
41+
projectPath: src/UniTask
42+
unityVersion: "2022.3.39f1"
43+
targetPlatform: StandaloneLinux64
44+
buildMethod: PackageExporter.Export
45+
2146
- uses: Cysharp/Actions/.github/actions/checkout@main
2247
with:
2348
repository: Cysharp/DocfxTemplate

docs/docfx.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"src": [
55
{
66
"files": [
7-
"UniTask/Assets/Plugins/UniTask/Runtime/**/*.cs"
7+
"UniTask/Library/ScriptAssemblies/UniTask*.dll"
88
],
99
"src": "../src"
1010
}
@@ -54,7 +54,6 @@
5454
}
5555
],
5656
"dest": "_site",
57-
5857
"globalMetadataFiles": [],
5958
"fileMetadataFiles": [],
6059
"template": [
@@ -67,4 +66,4 @@
6766
"keepFileLink": false,
6867
"cleanupCacheHistory": false
6968
}
70-
}
69+
}

0 commit comments

Comments
 (0)