-
Notifications
You must be signed in to change notification settings - Fork 10
54 lines (39 loc) · 1.15 KB
/
ci.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
name: CI/CD Workflow
on:
push:
branches:
- main
- develop
jobs:
build-main:
runs-on: self-hosted
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Build app
run: npm run build
- name: Copy Server File
run: cp -r .next /var/www/web3bridgewebsite
- name: Clean up folder
run: rm -vrf node_modules
- name: Restart Server
run: pm2 restart web3bridgewebsite || pm2 start --name web3bridgewebsite npm -- start
build-dev:
runs-on: self-hosted
if: github.ref == 'refs/heads/develop'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Build app
run: npm run build
- name: Copy Server File
run: cp -r .next /var/www/dev-web3bridgewebsite
- name: Clean up folder
run: rm -vrf node_modules
- name: Restart Server
run: pm2 restart dev-web3bridgewebsite || pm2 start --name dev-web3bridgewebsite npm -- start