Deploy #4
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: Deploy | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| artifact_id: | |
| description: The ID of the source artifact | |
| required: true | |
| type: string | |
| run_id: | |
| description: The ID of the run containing the source artifact | |
| required: true | |
| type: string | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 | |
| id: auth | |
| with: | |
| app-id: ${{ secrets.APP_ID }} | |
| owner: ${{ secrets.PAGES_SOURCE_REPO_OWNER }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| repositories: ${{ secrets.PAGES_SOURCE_REPO_NAME }} | |
| - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 | |
| with: | |
| artifact-ids: ${{ inputs.artifact_id }} | |
| github-token: ${{ steps.auth.outputs.token }} | |
| repository: ${{ secrets.PAGES_SOURCE_REPO_OWNER }}${{ '/' }}${{ secrets.PAGES_SOURCE_REPO_NAME }} | |
| run-id: ${{ inputs.run_id }} | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| compression-level: 0 | |
| name: github-pages | |
| path: artifact.tar | |
| retention-days: 1 | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| needs: prepare | |
| permissions: | |
| id-token: write | |
| pages: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 | |
| id: deployment |