Merge branch 'main' of https://git.shiblysolution.id/SAUDE-TL/service-master-data
This commit is contained in:
43
.gitea/workflows/deploy.yml
Normal file
43
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,43 @@
|
||||
name: Deploy Backend
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: linux
|
||||
defaults:
|
||||
run:
|
||||
working-directory: /home/app/saude/service-master-data
|
||||
|
||||
steps:
|
||||
- name: Install SSH
|
||||
run: |
|
||||
if command -v apk >/dev/null; then
|
||||
apk add --no-cache openssh-client
|
||||
elif command -v apt-get >/dev/null; then
|
||||
apt-get update && apt-get install -y openssh-client
|
||||
fi
|
||||
|
||||
- name: Install Node
|
||||
run: apk add --no-cache nodejs npm
|
||||
|
||||
- name: Pull latest source from main
|
||||
run: |
|
||||
git fetch origin
|
||||
git reset --hard origin/main
|
||||
|
||||
- name: Install deps
|
||||
run: npm install
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export NODE_ENV=stag
|
||||
npm run swagger
|
||||
npm run build
|
||||
|
||||
- name: Reload PM2
|
||||
run: |
|
||||
ssh -o StrictHostKeyChecking=no root@172.21.0.1 "/usr/bin/pm2 reload saude-svc-master-data || /usr/bin/pm2 start /home/app/saude/ecosystem.config.js --only saude-svc-master-data"
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"app": {
|
||||
"name": "Service Master Data",
|
||||
"description": "Purpose of this service is to provide master data product, master data suco and etc",
|
||||
"description": "Purpose of this service is to provide master data, master data and etc",
|
||||
"version": "1.0.0",
|
||||
"env": "Staging"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user