File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Pull, NPM Install, Restart Service and Reload Nginx
13+ uses : appleboy/ssh-action@master
14+ with :
15+ host : ${{ secrets.HOST }}
16+ username : ${{ secrets.USERNAME }}
17+ password : ${{ secrets.PASSWORD }}
18+ port : ${{ secrets.PORT }}
19+ script : |
20+ export NVM_DIR="$HOME/.nvm"
21+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
22+
23+ cd /var/www/rent
24+ git pull
25+ npm ci
26+ npm run build
27+
28+ echo ${{ secrets.PASSWORD }} | sudo -S systemctl stop rent.service
29+ echo ${{ secrets.PASSWORD }} | sudo -S systemctl start rent.service
30+ echo ${{ secrets.PASSWORD }} | sudo -S systemctl reload nginx
You can’t perform that action at this time.
0 commit comments