ci: Checkout submodules #10
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: Deploy documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - wip | |
| pull_request: | |
| branches: | |
| - main | |
| - wip | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pages: write | |
| concurrency: | |
| group: docs-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| deploy-docs: | |
| name: Build and deploy documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| - name: Setup Python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: '3.14' | |
| - name: Install DocFX | |
| run: dotnet tool install -g docfx | |
| - name: Output API reference with DocFX | |
| run: docfx metadata | |
| - name: Download sanitization script | |
| run: git clone https://gist.github.com/332889a0a46458470b0952dd039422e9.git ./gist-clone | |
| - name: Sanitize DocFX for all frameworks | |
| run: | | |
| python ./gist-clone/sanitize-docfx-output.py ./docs/api/net10.0 | |
| python ./gist-clone/sanitize-docfx-output.py ./docs/api/net8.0 | |
| python ./gist-clone/sanitize-docfx-output.py ./docs/api/net481 | |
| python ./gist-clone/sanitize-docfx-output.py ./docs/api/net472 | |
| - name: Install Docusaurus | |
| run: npm install | |
| - name: Build site with Docusaurus | |
| run: npm run build | |
| - name: Publish Docusaurus site | |
| if: github.event_name == 'push' | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: build | |
| force_orphan: true |