Skip to content

Build & Deploy Stage #115

Build & Deploy Stage

Build & Deploy Stage #115

name: Build & Deploy Stage
on: [workflow_dispatch]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
ref: master
- name: Install Dependencies
run: npm install && npm run build
deploy:
name: Deploy
#needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
ref: master
- name: Initialize Google Cloud SDK
uses: zxyle/publish-gae-action@master
with:
service_account_email: ${{ secrets.GCP_SA_EMAIL_STAGE }}
service_account_key: ${{ secrets.GCP_SA_KEY_STAGE }}
project_id: ${{ secrets.GCP_PROJECT_ID_STAGE }}
gae_variables: ${{ secrets.GAE_VARIABLES_STAGE }}
- name: Publish app to Google App Engine
run: |
# This client-secret.json is converted by GCP_SA_KEY.
gcloud auth activate-service-account ${{ secrets.GCP_SA_EMAIL_STAGE }} --key-file=client-secret.json
gcloud config set project ${{ secrets.GCP_PROJECT_ID_STAGE }}
gcloud -q app deploy --appyaml app-stage.yaml --promote --version staging