From 5c81d861f43d28976ee1571c0830a56b63cc6fd9 Mon Sep 17 00:00:00 2001 From: Sharun Date: Sat, 24 Aug 2024 17:00:17 -0700 Subject: [PATCH] give permissions to the workflow, hopefully fixes #55 --- .github/workflows/build-and-deploy.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index ce0661b8..70db5d30 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -15,6 +15,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true +permissions: + deployments: write + jobs: build: runs-on: ubuntu-24.04 @@ -101,7 +104,7 @@ jobs: name: Create GitHub deployment id: deployment with: - token: '${{ secrets.PAT_FOR_DEPLOYMENTS }}' + token: '${{ github.token }}' environment-url: https://www.arun.blog environment: Production @@ -117,7 +120,7 @@ jobs: if: success() uses: chrnorm/deployment-status@v2 with: - token: '${{ secrets.PAT_FOR_DEPLOYMENTS }}' + token: '${{ github.token }}' environment-url: ${{ steps.deployment.outputs.environment_url }} deployment-id: ${{ steps.deployment.outputs.deployment_id }} state: 'success' @@ -126,7 +129,7 @@ jobs: if: failure() uses: chrnorm/deployment-status@v2 with: - token: '${{ secrets.PAT_FOR_DEPLOYMENTS }}' + token: '${{ github.token }}' environment-url: ${{ steps.deployment.outputs.environment_url }} deployment-id: ${{ steps.deployment.outputs.deployment_id }} state: 'failure'