-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (30 loc) · 1.17 KB
/
deploy.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 GCP
on:
push:
branches:
- main
jobs:
deploy:
permissions:
contents: "read"
id-token: "write"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: "auth"
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.GCP_SA_KEY }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v2"
- name: "Use gcloud CLI"
run: "gcloud info"
- name: "Trigger Cloud Build"
env:
NEXT_PUBLIC_QUESTION_SERVICE_URL: ${{ secrets.NEXT_PUBLIC_QUESTION_SERVICE_URL }}
NEXT_PUBLIC_AUTH_SERVICE_URL: ${{ secrets.NEXT_PUBLIC_AUTH_SERVICE_URL }}
AUTH_SERVICE_URL: ${{ secrets.AUTH_SERVICE_URL }}
QUESTION_SERVICE_URL: ${{ secrets.QUESTION_SERVICE_URL }}
run: |
gcloud builds submit --config cloudbuild.yaml --substitutions _NEXT_PUBLIC_QUESTION_SERVICE_URL="$NEXT_PUBLIC_QUESTION_SERVICE_URL",_NEXT_PUBLIC_AUTH_SERVICE_URL="$NEXT_PUBLIC_AUTH_SERVICE_URL",_AUTH_SERVICE_URL="$AUTH_SERVICE_URL",_QUESTION_SERVICE_URL="$QUESTION_SERVICE_URL"