Skip to content

Commit f2ee1e9

Browse files
authored
+ beget-deploy.yml
1 parent a7b9743 commit f2ee1e9

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/beget-deploy.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy Backend to Beget
2+
3+
on:
4+
push:
5+
branches: [ production ]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
13+
- name: Deploy to Beget via SSH
14+
uses: appleboy/ssh-action@v1.0.3
15+
with:
16+
host: ${{ secrets.BEGET_SSH_HOST }}
17+
username: ${{ secrets.BEGET_SSH_USER }}
18+
key: ${{ secrets.BEGET_SSH_PASSWORD }}
19+
source: "src/main/java/"
20+
target: ${{ secrets.BEGET_DEPLOY_PATH }}
21+
22+
- name: Restart application
23+
uses: appleboy/ssh-action@v1.0.3
24+
with:
25+
host: ${{ secrets.BEGET_SSH_HOST }}
26+
username: ${{ secrets.BEGET_SSH_USER }}
27+
key: ${{ secrets.BEGET_SSH_PASSWORD }}
28+
script: |
29+
cd /root/schedule-parse-system/
30+
bash restart-services.sh

0 commit comments

Comments
 (0)