-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.11 KB
/
google-cloud-deployer.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
name: self-serve deployer
on:
push:
branches: [deploy-prod]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
deploy:
runs-on: self-hosted
steps:
- name: checkout repo+branch
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: install and build server
run: |
cd backend
npm install
- name: restart server
env:
PORT: ${{ secrets.PORT }}
MY_SQL_DB_HOST: ${{ secrets.MY_SQL_DB_HOST }}
MY_SQL_DB_USER: ${{ secrets.MY_SQL_DB_USER }}
MY_SQL_DB_PASSWORD: ${{ secrets.MY_SQL_DB_PASSWORD }}
MY_SQL_DB_PORT: ${{ secrets.MY_SQL_DB_PORT }}
MY_SQL_DB_DATABASE: ${{ secrets.MY_SQL_DB_DATABASE }}
MY_SQL_DB_CONNECTION_LIMIT: ${{ secrets.MY_SQL_DB_CONNECTION_LIMIT }}
SOCKET_PATH: ${{ secrets.SOCKET_PATH }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
ORIGIN: ${{ secrets.ORIGIN }}
run: |
cd backend
npm run start:prod