File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to Hetzner
2+
3+ on :
4+ push :
5+ branches : [main]
6+
7+ jobs :
8+ deploy :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+
13+ - uses : pnpm/action-setup@v4
14+
15+ - uses : actions/setup-node@v4
16+ with :
17+ node-version : 24
18+ cache : pnpm
19+
20+ - run : pnpm install --frozen-lockfile
21+
22+ - run : pnpm build
23+
24+ - name : Deploy to server
25+ uses : easingthemes/ssh-deploy@v5
26+ with :
27+ SSH_PRIVATE_KEY : ${{ secrets.SSH_PRIVATE_KEY }}
28+ REMOTE_HOST : ${{ secrets.REMOTE_HOST }}
29+ REMOTE_USER : deploy
30+ SOURCE : build/
31+ TARGET : /var/www/svelteforge/build/
32+ ARGS : -azP --delete
33+
34+ - name : Restart PM2
35+ uses : appleboy/ssh-action@v1
36+ with :
37+ host : ${{ secrets.REMOTE_HOST }}
38+ username : deploy
39+ key : ${{ secrets.SSH_PRIVATE_KEY }}
40+ script : pm2 restart svelteforge
You can’t perform that action at this time.
0 commit comments