From c98c3890f59a90d36188d3e53c1800ff3a959ac7 Mon Sep 17 00:00:00 2001 From: Ben Grant Date: Fri, 19 Aug 2022 15:52:55 +1000 Subject: [PATCH] Setup backend ci --- .github/workflows/deploy_backend.yml | 30 +++++++++++++++++++++++++++ .github/workflows/deploy_frontend.yml | 2 -- crabfit-backend/app.yaml | 2 +- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/deploy_backend.yml diff --git a/.github/workflows/deploy_backend.yml b/.github/workflows/deploy_backend.yml new file mode 100644 index 0000000..a53de1f --- /dev/null +++ b/.github/workflows/deploy_backend.yml @@ -0,0 +1,30 @@ +name: Deploy Backend + +on: + push: + branches: ['main'] + paths: ['crabfit-backend/**'] + +jobs: + deploy: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: crabfit-backend + + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v3 + - id: auth + uses: google-github-actions/auth@v0 + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' + - id: deploy + uses: google-github-actions/deploy-appengine@v0 + with: + working_directory: crabfit-backend + version: v1 diff --git a/.github/workflows/deploy_frontend.yml b/.github/workflows/deploy_frontend.yml index 5af7c6a..6ba43c7 100644 --- a/.github/workflows/deploy_frontend.yml +++ b/.github/workflows/deploy_frontend.yml @@ -26,8 +26,6 @@ jobs: cache-dependency-path: '**/yarn.lock' - run: yarn install --immutable - run: yarn build - - name: Copy app.yaml to build - run: 'cp app.yaml ./dist/app.yaml' - id: auth uses: google-github-actions/auth@v0 with: diff --git a/crabfit-backend/app.yaml b/crabfit-backend/app.yaml index 0e4cbaa..022941d 100644 --- a/crabfit-backend/app.yaml +++ b/crabfit-backend/app.yaml @@ -1,2 +1,2 @@ -runtime: nodejs10 +runtime: nodejs16 service: api