-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1.03 KB
/
manual.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
on:
push:
branches:
- main
name: 🚀 Deploy website on push
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3
- name: 🖥 Use Node.js 21
uses: actions/setup-node@v2
with:
node-version: "21"
- name: 🔨 Build Project
run: npm install && npm run build
- name: 📂 Copy Build Files to the server
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
source: "dist,package.json,package-lock.json"
target: ${{secrets.TARGET}}
- name: ♻️ Restart the servers
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script : ${{secrets.ENV}} && npm install && touch ${{secrets.RESTART}}