Skip to content

Deploy DEV

Deploy DEV #23

Workflow file for this run

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