From d86792a46fc9007a98efa347600c161e420cad91 Mon Sep 17 00:00:00 2001 From: Francesc Armengol Date: Mon, 18 Sep 2023 12:32:32 +0200 Subject: [PATCH] Only upload on main branch --- .github/workflows/ci.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ed9d19..0ef04df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,6 @@ on: jobs: build: runs-on: ubuntu-latest - permissions: - id-token: write - contents: read steps: - uses: actions/checkout@v3 @@ -33,6 +30,15 @@ jobs: - run: pnpm build + deploy: + runs-on: ubuntu-latest + needs: build + if: github.ref == 'refs/heads/main' + permissions: + id-token: write + contents: read + + steps: - name: Configure AWS credentials from Production account uses: aws-actions/configure-aws-credentials@v4 with: