Repository navigation
Website #2
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: Website | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: [Benchmarks] | |
| types: [completed] | |
| permissions: | |
| contents: read | |
| jobs: | |
| qualify: | |
| name: Check website | |
| concurrency: | |
| group: keyload-site-qualification | |
| cancel-in-progress: false | |
| if: >- | |
| github.repository == 'managedcode/KeyLoad' && github.event.repository.id == 477801965 && | |
| ((github.ref == 'refs/heads/main' && | |
| (github.event_name == 'push' || github.event_name == 'workflow_dispatch')) || | |
| (github.event_name == 'workflow_run' && | |
| github.event.workflow_run.head_repository.id == 477801965 && | |
| github.event.workflow_run.head_branch == 'main' && | |
| github.event.workflow_run.name == 'Benchmarks' && | |
| github.event.workflow_run.path == '.github/workflows/benchmarks.yml' && | |
| github.event.workflow_run.status == 'completed' && | |
| (github.event.workflow_run.event == 'push' || github.event.workflow_run.event == 'workflow_dispatch') && | |
| (github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == 'failure'))) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 180 | |
| permissions: {contents: read, actions: read} | |
| outputs: | |
| mode: ${{ steps.qualification.outputs.mode }} | |
| site_revision: ${{ steps.qualification.outputs.site_revision }} | |
| benchmark_mode: ${{ steps.qualification.outputs.benchmark_mode }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| steps: | |
| - name: Download source code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: ${{ github.workflow_sha }} | |
| path: control | |
| persist-credentials: false | |
| - name: Run website checks | |
| id: qualification | |
| uses: ./control/.github/workflows/Features/BenchmarkComparisons/QualifySite | |
| deploy: | |
| name: Publish website | |
| concurrency: | |
| group: keyload-site-deployment | |
| cancel-in-progress: false | |
| needs: qualify | |
| if: ${{ always() && !cancelled() && needs.qualify.result == 'success' && needs.qualify.outputs.mode == 'publish' }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| permissions: {contents: read, actions: read, pages: write, id-token: write} | |
| environment: {name: github-pages, url: '${{ steps.publication.outputs.page_url }}'} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| QUALIFIED_REVISION: ${{ needs.qualify.outputs.site_revision }} | |
| CONTROL_REVISION: ${{ github.workflow_sha }} | |
| KEYLOAD_SITE_BENCHMARK_MODE: ${{ needs.qualify.outputs.benchmark_mode }} | |
| steps: | |
| - name: Download source code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: ${{ github.workflow_sha }} | |
| path: control | |
| persist-credentials: false | |
| - name: Publish website | |
| id: publication | |
| uses: ./control/.github/workflows/Features/BenchmarkComparisons/DeploySite |