-
-
Notifications
You must be signed in to change notification settings - Fork 12
56 lines (46 loc) · 1.62 KB
/
deploy.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Deployment BETA
on:
release:
types: [published]
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: beta
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install --omit=dev
- name: Get production data
run: |
cp ../.env .env
cp ../docker-compose.override.yml docker-compose.override.yml
- name: Check if .env file has content
run: |
if grep -q . .env; then
echo ".env file is not empty"
else
echo ".env file is empty"
echo "stop_workflow=true" >> $GITHUB_OUTPUT
fi
- name: Check if docker-compose.override.yml file has content
run: |
if grep -q . docker-compose.override.yml; then
echo "docker-compose.override.yml file is not empty"
else
echo "docker-compose.override.yml file is empty"
echo "stop_workflow=true" >> $GITHUB_OUTPUT
fi
- name: Build
run: |
npm run restart-prod
- name: Stop Workflow
if: steps.check_condition.outputs.stop_workflow == 'true'
run: |
echo "Stopping workflow"
exit 0