-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.04 KB
/
Copy pathdeploy-web.yml
File metadata and controls
47 lines (39 loc) · 1.04 KB
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
38
39
40
41
42
43
44
45
46
47
name: Deploy Web
on:
push:
branches:
- master
paths:
- "web/**"
workflow_dispatch:
workflow_call:
env:
PROJECT_ID: demetereye
REGION: us-central1
SERVICE_NAME: demetereye-web
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up gcloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Configure gcloud defaults
run: |
gcloud config set project "$PROJECT_ID"
gcloud config set run/region "$REGION"
- name: Deploy Web service
working-directory: web
run: |
gcloud run deploy "$SERVICE_NAME" \
--source . \
--region "$REGION" \
--allow-unauthenticated \
--min-instances 0 --max-instances 2 \
--memory 256Mi --cpu 1 \
--port 8080