-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 1.23 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Deploy to GAE
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
deploy:
name: Deploying to Google Cloud
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Initialize Google App Engine
uses: zxyle/publish-gae-action@master
with:
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ secrets.PROJECT_ID }}
- name: Publish app to Google App Engine
run: |
echo "${{ secrets.DOT_ENV }}" | base64 --decode > .env
echo "${{ secrets.APPLICATION_DEFAULT_CREDENTIALS }}" | base64 --decode > application_default_credentials.json
gcloud auth activate-service-account ${{ secrets.GCP_SA_EMAIL }} --key-file=client-secret.json
gcloud config set project ${{ secrets.PROJECT_ID }}
gcloud -q app deploy