-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (53 loc) · 1.76 KB
/
deploy-dev.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Deploy DEV
on:
[workflow_dispatch]
jobs:
DeployFrontend:
runs-on: ubuntu-latest
environment: DEV
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Create env file
run: echo ${{ secrets.FRONTEND_ENVFILE }} | base64 --decode > .env
- run: yarn
- run: CI=false yarn build
- uses: 'google-github-actions/auth@v0'
with:
# Credentials stored inside WDCC organisation secrets
credentials_json: '${{ secrets.VPS_GCP_DEPLOYMENT_SA_CREDENTIALS }}'
- uses: 'google-github-actions/upload-cloud-storage@v0'
with:
# Build path (path is excluded due to parent: false flag)
path: 'frontend/build'
parent: false
# Bucket to add contents into
destination: 'vps-dev.wdcc.co.nz'
DeployBackend:
runs-on: ubuntu-latest
environment: DEV
defaults:
run:
working-directory: ./backend
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Create env file
run: echo ${{ secrets.BACKEND_ENVFILE }} | base64 --decode > gae_env.yaml
- run: yarn
- uses: 'google-github-actions/auth@v0'
with:
# Credentials stored inside WDCC organisation secrets
credentials_json: '${{ secrets.VPS_GCP_DEPLOYMENT_SA_CREDENTIALS }}'
- id: 'app-engine-deploy'
uses: 'google-github-actions/deploy-appengine@v0'
with:
project_id: wdcc-vps-dev
working_directory: ./backend