Deploy webpage #80
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Help Docs | |
on: | |
workflow_run: | |
workflows: [Unit Test] | |
types: [completed] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Create docs | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: moon-dev/Library | |
key: Library-Moon | |
restore-keys: | | |
Library- | |
- uses: game-ci/unity-builder@v4 | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_CI_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_CI_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_CI_PASSWORD }} | |
with: | |
targetPlatform: StandaloneWindows | |
projectPath: moon-dev/ | |
buildMethod: UnityBuilderAction.BuildScript.Build | |
- name: Dotnet Setup | |
uses: actions/setup-dotnet@v3 | |
- name: Setup Docfx | |
run: dotnet tool update -g docfx | |
- name: Build API | |
run: docfx metadata docs/docfx.json | |
- name: Build Site | |
run: docfx build docs/docfx.json | |
- name: Upload site artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: _site | |
path: docs/_site | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Download the generated documentation | |
- name: Download site artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: _site | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{secrets.CLOUDFLARE_ACCOUNT_ID}} | |
projectName: moon-manual | |
directory: ./ | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
branch: main | |
workingDirectory: ./_site | |
wranglerVersion: '3' |