Skip to content

Set v34

Set v34 #27

Workflow file for this run

on:
push:
tags:
- v*
jobs:
deploy-client:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install NPM packages
run: cd client; npm i
- name: Create env file
run: echo '${{ secrets.ENV_FILE_PROD }}' > client/.env.prod
- name: Add COMMIT_HASH to env file
run: echo "COMMIT_HASH=$(git rev-parse --short=4 HEAD)" >> client/.env.prod
- name: Build client
run: cd client; npm run build
- name: Prepare authorization with Google Cloud
id: 'auth'
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS_PROD }}'
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Deploy to production environment
uses: FirebaseExtended/action-hosting-deploy@v0
with:
firebaseServiceAccount: '${{ secrets.GCP_CREDENTIALS_PROD }}'
expires: 30d
channelId: live
projectId: darci-gg
deploy-server:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install NPM packages
run: cd server; npm i
- name: Create env file
run: echo '${{ secrets.ENV_FILE_PROD }}' > server/.env.prod
- name: Add COMMIT_HASH to env file
run: echo "COMMIT_HASH=$(git rev-parse --short=4 HEAD)" >> server/.env.prod
- name: Build server
run: cd server; npm run build
- name: Prepare authorization with Google Cloud
id: 'auth'
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS_PROD }}'
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Deploy to production environment
run: cd server; ./deploy-prod.sh