|
8 | 8 |
|
9 | 9 | jobs:
|
10 | 10 | run-docfx:
|
| 11 | + if: ${{ ((github.event_name == 'push' && github.repository_owner == 'Cysharp') || startsWith(github.event.pull_request.head.label, 'Cysharp:')) && github.triggering_actor != 'dependabot[bot]' }} |
11 | 12 | permissions:
|
12 | 13 | contents: write
|
13 | 14 | pages: write
|
14 | 15 | runs-on: ubuntu-24.04
|
15 | 16 | timeout-minutes: 10
|
16 | 17 | steps:
|
| 18 | + - name: Load secrets |
| 19 | + id: op-load-secret |
| 20 | + uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 # v2.0.0 |
| 21 | + with: |
| 22 | + export-env: false |
| 23 | + env: |
| 24 | + OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN_PUBLIC }} |
| 25 | + UNITY_EMAIL: "op://${{ vars.OP_VAULT_ACTIONS_PUBLIC }}/UNITY_LICENSE/username" |
| 26 | + UNITY_PASSWORD: "op://${{ vars.OP_VAULT_ACTIONS_PUBLIC }}/UNITY_LICENSE/credential" |
| 27 | + UNITY_SERIAL: "op://${{ vars.OP_VAULT_ACTIONS_PUBLIC }}/UNITY_LICENSE/serial" |
17 | 28 | - uses: Cysharp/Actions/.github/actions/checkout@main
|
| 29 | + # Execute scripts: Export Package |
| 30 | + # /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export |
| 31 | + - name: Build Unity (.unitypackage) |
| 32 | + uses: Cysharp/Actions/.github/actions/unity-builder@main |
| 33 | + env: |
| 34 | + UNITY_EMAIL: ${{ steps.op-load-secret.outputs.UNITY_EMAIL }} |
| 35 | + UNITY_PASSWORD: ${{ steps.op-load-secret.outputs.UNITY_PASSWORD }} |
| 36 | + UNITY_SERIAL: ${{ steps.op-load-secret.outputs.UNITY_SERIAL }} |
| 37 | + with: |
| 38 | + projectPath: src/UniTask |
| 39 | + unityVersion: "2022.3.39f1" |
| 40 | + targetPlatform: StandaloneLinux64 |
| 41 | + buildMethod: PackageExporter.Export |
| 42 | + |
18 | 43 | - uses: Cysharp/Actions/.github/actions/checkout@main
|
19 | 44 | with:
|
20 | 45 | repository: Cysharp/DocfxTemplate
|
21 | 46 | path: docs/_DocfxTemplate
|
22 |
| - - uses: Kirbyrawr/docfx-action@db9a22c8fe1e8693a2a21be54cb0b87dfaa72cc4 |
23 |
| - name: Docfx metadata |
24 |
| - with: |
25 |
| - args: metadata docs/docfx.json |
26 |
| - - uses: Kirbyrawr/docfx-action@db9a22c8fe1e8693a2a21be54cb0b87dfaa72cc4 |
27 |
| - name: Docfx build |
28 |
| - with: |
29 |
| - args: build docs/docfx.json |
| 47 | + - uses: Cysharp/Actions/.github/actions/setup-dotnet@main |
| 48 | + - name: dotnet tool restore |
| 49 | + run: dotnet tool restore |
| 50 | + - name: Docfx metadata |
| 51 | + run: dotnet docfx metadata docs/docfx.json |
| 52 | + - name: Docfx build |
| 53 | + run: dotnet docfx build docs/docfx.json |
30 | 54 | - name: Publish to GitHub Pages
|
31 | 55 | uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
|
32 | 56 | with:
|
|
0 commit comments