Build Stride Docs for Azure Web App Release 🚀 #24
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
| # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy | |
| # More GitHub Actions for Azure: https://github.com/Azure/actions | |
| name: Build Stride Docs for Azure Web App Release 🚀 | |
| env: | |
| COMMON_SETTINGS_PATH: en/docfx.json | |
| VERSION: "2.0.0.${{ github.run_number }}" | |
| DOCS_PATH: stride-docs | |
| on: | |
| push: | |
| branches: | |
| - release | |
| paths-ignore: | |
| - 'README.md' | |
| - 'Stride.Docs.sln' | |
| - 'BuildDocs.ps1' | |
| - 'wiki/**' | |
| - .gitignore | |
| - '.github/**' | |
| workflow_dispatch: | |
| inputs: | |
| skipPdfBuilding: | |
| description: Skip PDF building | |
| required: true | |
| default: true | |
| type: boolean | |
| skipApiBuilding: | |
| description: Skip API building | |
| required: true | |
| default: true | |
| type: boolean | |
| strideBranch: | |
| description: Stride branch to checkout | |
| required: true | |
| default: master | |
| type: string | |
| permissions: | |
| contents: write # required to create releases/tags | |
| jobs: | |
| build: | |
| # Run this job only if the repository is 'stride3d/stride-docs' | |
| if: github.repository == 'stride3d/stride-docs' | |
| runs-on: windows-2025-vs2026 | |
| steps: | |
| # Checkout the Stride Docs repository from the branch that triggered the workflow | |
| - name: Checkout Stride Docs | |
| uses: actions/checkout@v6 | |
| with: | |
| path: ${{ env.DOCS_PATH }} | |
| lfs: true | |
| - name: Run Global Setup | |
| id: setup | |
| uses: ./stride-docs/.github/actions/setup-stride | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| skip-pdf-building: ${{ inputs.skipPdfBuilding }} | |
| skip-api-building: ${{ inputs.skipApiBuilding }} | |
| stride-branch: ${{ inputs.strideBranch || 'master' }} | |
| - name: Upload artifact for deployment job | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: DocFX-app | |
| path: ./${{ env.DOCS_PATH }}/_site | |
| - name: Create GitHub Release | |
| run: | | |
| gh release create ${{ env.VERSION }} --title "v${{ env.VERSION }}" --notes "Release notes for ${{ env.VERSION }}" --draft | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| working-directory: ${{ env.DOCS_PATH }} | |
| deploy: | |
| if: github.repository == 'stride3d/stride-docs' | |
| runs-on: windows-2025-vs2026 | |
| needs: build | |
| environment: | |
| name: 'Production' | |
| url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | |
| steps: | |
| - name: Download artifact from build job | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: DocFX-app | |
| path: ./${{ env.DOCS_PATH }}/_site | |
| - name: Deploy to Azure Web App | |
| id: deploy-to-webapp | |
| uses: azure/webapps-deploy@v2 | |
| with: | |
| app-name: 'stride-doc' | |
| slot-name: 'Production' | |
| publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_4803638D673FA67D0C8650F34C4FA9D1 }} | |
| package: ./${{ env.DOCS_PATH }}/_site |