Skip to content

πŸš€ Deploy

πŸš€ Deploy #3

Workflow file for this run

name: deploy
run-name: πŸš€ Deploy
on:
workflow_run:
workflows: ["build"]
branches: ["main", "release/*"]
types:
- completed
env:
DEPLOY_PREVIEW: ${{ github.event.workflow_run.event == 'pull_request' }}
ARTIFACT_NAME: "build-artifact-${{ github.sha }}"
jobs:
deploy:
# Only run if the build was successful
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: πŸš€ Deploy
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
contents: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: ${{ env.ARTIFACT_NAME}}
preview: ${{ env.DEPLOY_PREVIEW }}
- name: Get the URL for the deployment
run: echo "${{ steps.deployment.outputs.page_url }}"