Setup backend ci

This commit is contained in:
Ben Grant 2022-08-19 15:52:55 +10:00
parent db52225e46
commit c98c3890f5
3 changed files with 31 additions and 3 deletions

30
.github/workflows/deploy_backend.yml vendored Normal file
View file

@ -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

View file

@ -26,8 +26,6 @@ jobs:
cache-dependency-path: '**/yarn.lock' cache-dependency-path: '**/yarn.lock'
- run: yarn install --immutable - run: yarn install --immutable
- run: yarn build - run: yarn build
- name: Copy app.yaml to build
run: 'cp app.yaml ./dist/app.yaml'
- id: auth - id: auth
uses: google-github-actions/auth@v0 uses: google-github-actions/auth@v0
with: with:

View file

@ -1,2 +1,2 @@
runtime: nodejs10 runtime: nodejs16
service: api service: api