diff --git a/.github/workflows/deploy-frontend-monorepo.yml b/.github/workflows/deploy-frontend-monorepo.yml index 3267a21..92b4a3e 100644 --- a/.github/workflows/deploy-frontend-monorepo.yml +++ b/.github/workflows/deploy-frontend-monorepo.yml @@ -68,10 +68,20 @@ jobs: permissions: id-token: write contents: read + deployments: write steps: - name: Checkout uses: actions/checkout@v4 + - name: Create GitHub deployment + uses: chrnorm/deployment-action@v2 + id: deployment + with: + token: '${{ github.token }}' + log-url: ${{ needs.get-environment-name.outputs.url }} + environment-url: ${{ needs.get-environment-name.outputs.url }} + environment: ${{ needs.get-environment-name.outputs.env-name }} + - name: Setup configuration id: config run: | @@ -230,3 +240,23 @@ jobs: sourcemaps: ${{ inputs.app-directory-name }}/build ignore_missing: true version: ${{ env.latest_tag }} + + - name: Update deployment status (success) + if: success() + uses: chrnorm/deployment-status@v2 + with: + token: '${{ github.token }}' + environment-url: ${{ steps.deployment.outputs.environment_url }} + log-url: ${{ steps.deployment.outputs.environment_url }} + deployment-id: ${{ steps.deployment.outputs.deployment_id }} + state: 'success' + + - name: Update deployment status (failure) + if: failure() + uses: chrnorm/deployment-status@v2 + with: + token: '${{ github.token }}' + environment-url: ${{ steps.deployment.outputs.environment_url }} + log-url: ${{ steps.deployment.outputs.environment_url }} + deployment-id: ${{ steps.deployment.outputs.deployment_id }} + state: 'failure'