Mirror Pages #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: Mirror Pages | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| source_run_id: | |
| description: Workflow run ID in cppsocial/site containing the Pages artifact | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| mirror: | |
| environment: | |
| name: github-pages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download source Pages artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: github-pages | |
| path: source-artifact | |
| github-token: ${{ secrets.GH_IO_SOURCE }} | |
| repository: cppsocial/site | |
| run-id: ${{ inputs.source_run_id }} | |
| - name: Verify source Pages artifact | |
| run: test -f source-artifact/artifact.tar | |
| - name: Upload mirror Pages artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: github-pages | |
| path: source-artifact/artifact.tar | |
| retention-days: 1 | |
| if-no-files-found: error | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: mirror | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v5 |