Skip to content

Commit 4cc6b86

Browse files
authored
Create deploy.yml
1 parent 5e6346a commit 4cc6b86

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Backend CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build:
9+
name: Build and Deploy
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v2
15+
16+
- name: Execute Remote SSH Commands
17+
uses: appleboy/ssh-action@master
18+
with:
19+
host: ${{ secrets.HOST }}
20+
username: ${{ secrets.USERNAME }}
21+
password: ${{ secrets.PASSWORD }}
22+
port: ${{ secrets.PORT }}
23+
script: |
24+
cd /home/backend/forwarder-script/
25+
git reset --hard origin/main
26+
git clean -fd
27+
git pull origin main --force
28+
bun install
29+
bun run update
30+
bun run restart

0 commit comments

Comments
 (0)