Skip to content

Commit d540190

Browse files
committed
chore: update deployment workflow to use Bun and rsync
1 parent f41d24c commit d540190

1 file changed

Lines changed: 21 additions & 16 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,35 @@ on:
33
push:
44
branches:
55
- main
6+
67
jobs:
7-
build:
8+
deploy:
89
runs-on: ubuntu-latest
10+
911
steps:
1012
- name: Checkout code
11-
uses: actions/checkout@v2
12-
- name: Setup Node.js
13-
uses: actions/setup-node@v2
14-
with:
15-
node-version: "21"
13+
uses: actions/checkout@v4
14+
15+
- name: Install Bun
16+
uses: oven-sh/setup-bun@v2
17+
1618
- name: Install dependencies
17-
run: npm install
19+
run: bun ci
20+
1821
- name: Create env file
1922
run: |
2023
echo "${{ secrets.ENV_FILE }}" > .env
24+
2125
- name: Build
22-
run: npm run build
26+
run: bun run build
27+
2328
- name: Deploy to VPS
24-
uses: appleboy/scp-action@master
29+
uses: burnett01/rsync-deployments@7.0.2
2530
with:
26-
host: ${{ secrets.HOST }}
27-
username: ${{ secrets.USERNAME }}
28-
password: ${{ secrets.PASSWORD }}
29-
port: ${{ secrets.PORT }}
30-
source: "dist/"
31-
target: ${{ secrets.TARGET_DIR }}
32-
strip_components: 1
31+
switches: -avzr --delete
32+
path: dist/
33+
remote_path: ${{ secrets.TARGET_DIR }}
34+
remote_host: ${{ secrets.HOST }}
35+
remote_port: ${{ secrets.PORT }}
36+
remote_user: ${{ secrets.USERNAME }}
37+
remote_key: ${{ secrets.SSH_KEY }}

0 commit comments

Comments
 (0)