File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Prod deploy
2+
3+ # Controls when the action will run.
4+ on :
5+ # Triggers the workflow on push or pull request events but only for the master branch
6+ push :
7+ branches :
8+ - master
9+ pull_request :
10+ types :
11+ - closed
12+ branches :
13+ - master
14+
15+ jobs :
16+ if_merged :
17+ if : github.event.pull_request.merged == true
18+ name : 🎉 Deploy
19+ runs-on : ubuntu-latest
20+
21+ steps :
22+ - name : 🚚 Get latest code
23+ uses : actions/checkout@v4
24+
25+ - name : Use Node.js 18
26+ uses : actions/setup-node@v4
27+ with :
28+ node-version : " 18"
29+
30+ - name : 🔨 Build Project
31+ run : |
32+ npm i
33+ npm run build-prod
34+
35+ - name : 📂 Deploy to Server
36+ uses : easingthemes/ssh-deploy@v4
37+ env :
38+ SSH_PRIVATE_KEY : ${{ secrets.SERVER_SSH_KEY }}
39+ # ARGS: "-rltgoDzvO --delete"
40+ SOURCE : " dist/"
41+ REMOTE_HOST : 192.34.62.123
42+ REMOTE_USER : mantis
43+ TARGET : public_html/vue/free
44+ EXCLUDE : " /node_modules/"
You can’t perform that action at this time.
0 commit comments