Skip to content

Deploy DEV

Deploy DEV #10

Workflow file for this run

name: Deploy DEV
on: [workflow_dispatch]
jobs:
deploy-backend:
runs-on: ubuntu-latest
environment: DEV
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@v3
- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: npm install
run: |
npm install
- name: Create env file
run: echo ${{ secrets.ASPA_DEV_BACKEND_ENVFILE }} | base64 --decode > .env
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.ASPA_DEV_GCP_DEPLOYMENT_SA_CREDENTIALS }}'
- id: 'app-engine-deploy'
uses: 'google-github-actions/deploy-appengine@v2'
with:
project_id: wdcc-aspa-dev
working_directory: ./packages/backend
deploy-frontend:
runs-on: ubuntu-latest
environment: DEV
defaults:
run:
working-directory: ./packages/frontend
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Create env file
run: echo ${{ secrets.ASPA_DEV_FRONTEND_ENVFILE }} | base64 --decode > .env
- run: yarn
- run: CI=false yarn build
- uses: 'google-github-actions/auth@v2'
with:
# Credentials stored inside WDCC organisation secrets
credentials_json: '${{ secrets.ASPA_DEV_GCP_DEPLOYMENT_SA_CREDENTIALS }}'
- uses: 'google-github-actions/upload-cloud-storage@v2'
with:
# Build path (path is excluded if parent: false flag)
path: 'packages/frontend/build'
parent: false
# Bucket to add contents into
destination: 'aspa-dev.wdcc.co.nz'