File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy CV Builder
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout repo
13+ uses : actions/checkout@v3
14+
15+ - name : Set up Node.js
16+ uses : actions/setup-node@v3
17+ with :
18+ node-version : 20
19+
20+ - name : Build frontend
21+ working-directory : ./frontend
22+ run : |
23+ npm install
24+ npm run build
25+
26+ - name : Deploy to server via SSH
27+ 28+ with :
29+ host : ${{ secrets.SERVER_IP }}
30+ username : ${{ secrets.SERVER_USER }}
31+ key : ${{ secrets.SERVER_SSH_KEY }}
32+ script : |
33+ cd ~/next-steps-cv-builder
34+ git pull origin main
35+ cd frontend
36+ npm install
37+ npm run build
38+ sudo rm -rf /var/www/html/*
39+ sudo cp -r dist/* /var/www/html/
40+ cd ../backend
41+ npm install
42+ pm2 restart backend
43+ sudo systemctl reload nginx
You can’t perform that action at this time.
0 commit comments