Build Toolkit NDepend Analysis for GitHub Pages #21
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
| # More GitHub Actions for Azure: https://github.com/Azure/actions | |
| name: Build Toolkit NDepend Analysis for GitHub Pages | |
| env: | |
| PROJECT_PATH_CORE: Stride.CommunityToolkit.sln | |
| on: | |
| workflow_dispatch: | |
| # Only allow one deployment at a time, cancel previous in-progress runs on new pushes | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read # to checkout | |
| pages: write # to deploy pages | |
| id-token: write # to authenticate deployment | |
| jobs: | |
| build-docs: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Dotnet Setup | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.x | |
| - name: Checkout Stride Community Toolkit | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: stride3d/stride-community-toolkit | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| lfs: true | |
| - name: Restore Stride dependencies | |
| run: dotnet restore ${{ env.PROJECT_PATH_CORE }} --runtime win-x64 | |
| - name: Build Stride.CommunityToolkit.sln | |
| run: dotnet build ${{ env.PROJECT_PATH_CORE }} --no-restore | |
| - name: NDepend | |
| uses: ndepend/ndepend-action@v2 | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| license: ${{ secrets.NDependLicense }} | |
| customconfig: Stride.CommunityToolkit.ndproj | |
| baseline: recent | |
| - name: Prepare Pages artifact (place files under toolkit/ndepend) | |
| shell: pwsh | |
| run: | | |
| $site = "_site/toolkit/ndepend" | |
| New-Item -ItemType Directory -Force -Path $site | Out-Null | |
| Copy-Item -Path ..\..\_temp\NDependOut\NDependReport.html -Destination "$site\NDependReport.html" -Force | |
| Copy-Item -Path ..\..\_temp\NDependOut\NDependReportFiles -Destination "$site\" -Recurse -Force | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: _site | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| needs: build-docs | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pages: write # required for Pages deployment | |
| id-token: write # required for OIDC | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |