From c4a92420b4f0a0898005c684d98a94ac83435e7c Mon Sep 17 00:00:00 2001 From: Lucas Rodriguez Date: Fri, 27 Sep 2024 21:24:15 -0500 Subject: [PATCH] Add deployment pipeline Signed-off-by: Lucas Rodriguez --- .github/workflows/deploy.yml | 27 +++++++++++++++++++++++++++ scripts/deploy.sh | 4 +--- 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..2c13e49 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: Deploy Website + +on: + push: + tags: + - v* + +permissions: + contents: read + +jobs: + deploy-site: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + + - name: Google Cloud Auth + uses: google-github-actions/auth@62cf5bd3e4211a0a0b51f2c6d6a37129d828611d # v2.1.5 + with: + project_id: "groovy-momentum-434802-g9" + workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} + + - name: Deploy + env: + IMAGE_VERSION: ${{ github.ref_name }} + run: ./scripts/deploy.sh diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 73d42e2..bc5865d 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -1,8 +1,6 @@ #!/bin/bash -set -e - -IMAGE_VERSION="v0.0.5" +set -euo pipefail cd ui && npm run build cd - || exit 1