[a72e01]: / .github / workflows / deploy_app_to_gcp.yaml

Download this file

35 lines (28 with data), 849 Bytes

 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
name: Deploy To Production (GCP) 🚀
on:
workflow_dispatch:
push:
# Sequence of patterns matched against refs/heads
branches:
- master
- main
jobs:
deploy-to-production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update app.yaml with environment variables
run: |
echo 'env_variables:
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}' > env.yaml
shell: bash
- name: Gcp auth
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCP_PRODUCTION_CREDENTIALS }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"
with:
version: ">= 363.0.0"
- name: "Use gcloud To Deploy Prod"
run: "gcloud app deploy --quiet"