mirror of
https://github.com/Cysharp/UniTask.git
synced 2026-05-14 19:10:09 +00:00
Merge pull request #677 from Cysharp/feature/docs
ci: replace docfx build from container to docfx command
This commit is contained in:
13
.config/dotnet-tools.json
Normal file
13
.config/dotnet-tools.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"docfx": {
|
||||
"version": "2.78.3",
|
||||
"commands": [
|
||||
"docfx"
|
||||
],
|
||||
"rollForward": false
|
||||
}
|
||||
}
|
||||
}
|
||||
40
.github/workflows/build-docs.yaml
vendored
40
.github/workflows/build-docs.yaml
vendored
@@ -8,25 +8,49 @@ on:
|
||||
|
||||
jobs:
|
||||
run-docfx:
|
||||
if: ${{ ((github.event_name == 'push' && github.repository_owner == 'Cysharp') || startsWith(github.event.pull_request.head.label, 'Cysharp:')) && github.triggering_actor != 'dependabot[bot]' }}
|
||||
permissions:
|
||||
contents: write
|
||||
pages: write
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Load secrets
|
||||
id: op-load-secret
|
||||
uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 # v2.0.0
|
||||
with:
|
||||
export-env: false
|
||||
env:
|
||||
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN_PUBLIC }}
|
||||
UNITY_EMAIL: "op://${{ vars.OP_VAULT_ACTIONS_PUBLIC }}/UNITY_LICENSE/username"
|
||||
UNITY_PASSWORD: "op://${{ vars.OP_VAULT_ACTIONS_PUBLIC }}/UNITY_LICENSE/credential"
|
||||
UNITY_SERIAL: "op://${{ vars.OP_VAULT_ACTIONS_PUBLIC }}/UNITY_LICENSE/serial"
|
||||
- uses: Cysharp/Actions/.github/actions/checkout@main
|
||||
# Execute scripts: Export Package
|
||||
# /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export
|
||||
- name: Build Unity (.unitypackage)
|
||||
uses: Cysharp/Actions/.github/actions/unity-builder@main
|
||||
env:
|
||||
UNITY_EMAIL: ${{ steps.op-load-secret.outputs.UNITY_EMAIL }}
|
||||
UNITY_PASSWORD: ${{ steps.op-load-secret.outputs.UNITY_PASSWORD }}
|
||||
UNITY_SERIAL: ${{ steps.op-load-secret.outputs.UNITY_SERIAL }}
|
||||
with:
|
||||
projectPath: src/UniTask
|
||||
unityVersion: "2022.3.39f1"
|
||||
targetPlatform: StandaloneLinux64
|
||||
buildMethod: PackageExporter.Export
|
||||
|
||||
- uses: Cysharp/Actions/.github/actions/checkout@main
|
||||
with:
|
||||
repository: Cysharp/DocfxTemplate
|
||||
path: docs/_DocfxTemplate
|
||||
- uses: Kirbyrawr/docfx-action@db9a22c8fe1e8693a2a21be54cb0b87dfaa72cc4
|
||||
name: Docfx metadata
|
||||
with:
|
||||
args: metadata docs/docfx.json
|
||||
- uses: Kirbyrawr/docfx-action@db9a22c8fe1e8693a2a21be54cb0b87dfaa72cc4
|
||||
name: Docfx build
|
||||
with:
|
||||
args: build docs/docfx.json
|
||||
- uses: Cysharp/Actions/.github/actions/setup-dotnet@main
|
||||
- name: dotnet tool restore
|
||||
run: dotnet tool restore
|
||||
- name: Docfx metadata
|
||||
run: dotnet docfx metadata docs/docfx.json
|
||||
- name: Docfx build
|
||||
run: dotnet docfx build docs/docfx.json
|
||||
- name: Publish to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
|
||||
with:
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
"src": [
|
||||
{
|
||||
"files": [
|
||||
"UniTask/Assets/Plugins/UniTask/Runtime/**/*.cs"
|
||||
"UniTask/Library/ScriptAssemblies/UniTask*.dll"
|
||||
],
|
||||
"exclude": [
|
||||
"UniTask/Library/ScriptAssemblies/UniTask.Tests.dll",
|
||||
"UniTask/Library/ScriptAssemblies/UniTask.Tests.Editor.dll"
|
||||
],
|
||||
"src": "../src"
|
||||
}
|
||||
@@ -54,7 +58,6 @@
|
||||
}
|
||||
],
|
||||
"dest": "_site",
|
||||
|
||||
"globalMetadataFiles": [],
|
||||
"fileMetadataFiles": [],
|
||||
"template": [
|
||||
|
||||
Reference in New Issue
Block a user