-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.25 KB
/
main.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
on:
push:
branches:
- main
- dev
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Deploying to Dev
uses: appleboy/[email protected]
if: github.ref == 'refs/heads/dev'
with:
host: ${{ secrets.DEV_SERVER }}
username: ${{ secrets.DEV_USER }}
key: ${{ secrets.DEV_SSH_KEY }}
script: |
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
cd /root/apps/securelog-rsc-example
git pull origin dev
yarn install
onboardbase run -c 'yarn build'
cp -r dist/* /var/www/secure-example
systemctl reload nginx
- name: Deploying to prod
uses: appleboy/[email protected]
if: github.ref == 'refs/heads/main'
with:
host: ${{ secrets.PROD_SERVER }}
username: ${{ secrets.PROD_USER }}
key: ${{ secrets.PROD_SSH_KEY }}
script: |
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
cd /root/apps/securelog-rsc-example
git pull origin main
yarn install
onboardbase run -c 'yarn build'
cp -r dist/* /var/www/secure-example
systemctl reload nginx