-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (29 loc) · 940 Bytes
/
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
name: Deploy to Server
on:
push:
branches:
- develop
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Deploy to Server
uses: appleboy/ssh-action@master
with:
host: ec2-54-207-67-252.sa-east-1.compute.amazonaws.com
username: ubuntu
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script: |
/home/ubuntu/.nvm/versions/node/v20.13.1/bin/node --version
/home/ubuntu/.nvm/versions/node/v20.13.1/bin/npm --version
cd /home/ubuntu/frontend/WallDreams
pwd
ls -l
git pull origin develop
# Build the project
npm run build
# Restart nginx service
sudo systemctl restart nginx