Repository navigation
pages #29
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: pages | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - docs/images/** | |
| - site/** | |
| - .github/workflows/pages.yml | |
| - .github/scripts/collect-site-results.sh | |
| - experiments/Synapse.ReferenceBenchmarks/Features/Website/** | |
| - experiments/Synapse.ReferenceBenchmarks/HostedArtifactReportCommand.cs | |
| - experiments/Synapse.ReferenceBenchmarks/Program.cs | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: [verify, performance-diagnostic] | |
| types: [completed] | |
| permissions: | |
| contents: read | |
| actions: read | |
| concurrency: | |
| group: github-pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build public site | |
| if: >- | |
| github.ref == 'refs/heads/main' && | |
| (github.event_name != 'workflow_run' || | |
| (github.event.workflow_run.head_branch == 'main' && | |
| github.event.workflow_run.head_repository.full_name == github.repository && | |
| (github.event.workflow_run.event == 'push' || | |
| github.event.workflow_run.event == 'workflow_dispatch'))) | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| ref: main | |
| persist-credentials: false | |
| - name: Install pinned .NET SDK | |
| uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 | |
| with: | |
| global-json-file: global.json | |
| - name: Install pinned Rust toolchain required by the reporter build | |
| run: rustup toolchain install 1.98.1 --profile minimal | |
| - name: Collect latest completed main CI result artifacts | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: bash .github/scripts/collect-site-results.sh "${RUNNER_TEMP}/site-results" | |
| - name: Build C# result validator | |
| run: | | |
| dotnet restore experiments/Synapse.ReferenceBenchmarks/Synapse.ReferenceBenchmarks.csproj --locked-mode | |
| dotnet build experiments/Synapse.ReferenceBenchmarks/Synapse.ReferenceBenchmarks.csproj --configuration Release --no-restore | |
| - name: Configure GitHub Pages | |
| uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 | |
| - name: Assemble static site artifact | |
| shell: bash | |
| run: | | |
| mkdir -p _site/images | |
| cp site/index.html site/styles.css site/site.js site/favicon.svg _site/ | |
| cp site/metrics.js site/comparisons.js site/comparisons.css _site/ | |
| cp docs/images/*.svg _site/images/ | |
| touch _site/.nojekyll | |
| dotnet experiments/Synapse.ReferenceBenchmarks/bin/Release/net10.0/Synapse.ReferenceBenchmarks.dll site-data \ | |
| --artifacts "${RUNNER_TEMP}/site-results" --runs "${RUNNER_TEMP}/site-results/runs.json" \ | |
| --output _site/data/latest.json | |
| - name: Upload GitHub Pages artifact | |
| uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 | |
| with: | |
| path: ./_site | |
| deploy: | |
| name: Publish public site | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 |