fix(ci): use linux-il2cpp image, no base tag exists for Unity 6 #40
This file contains hidden or 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: Example documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| # Build the documentation | |
| build: | |
| runs-on: ubuntu-latest # DocFX v2+ is cross-platform; no longer requires Windows | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # with: | |
| # submodules: true | |
| - name: Install DocFX | |
| run: dotnet tool install -g docfx --version 2.77.0 | |
| - name: Cache Unity managed DLLs | |
| id: cache-unity-dlls | |
| uses: actions/cache@v4 | |
| with: | |
| path: lib/UnityEngine | |
| key: unity-managed-dlls-6000.0.73f1-v1 | |
| - name: Extract Unity managed DLLs from game-ci image | |
| if: steps.cache-unity-dlls.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -p lib | |
| docker create --name unity-editor unityci/editor:ubuntu-6000.0.73f1-linux-il2cpp-3.2.2 | |
| docker cp unity-editor:/opt/unity/Editor/Data/Managed/UnityEngine lib/ | |
| docker rm unity-editor | |
| - name: Use README.md as index.md | |
| run: cp README.md Documentation/index.md | |
| - name: Build | |
| run: docfx Documentation/docfx.json | |
| # Upload the generated documentation (only on main for deployment) | |
| - name: Upload site artifact | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site # Must equal the 'build.dest' value in docfx.json | |
| # Deploy the generated documentation to GitHub Pages | |
| deploy: | |
| if: github.ref == 'refs/heads/main' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |