-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1008 Bytes
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Deploy v1
on:
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install
- name: Echo ENV to .env
run: echo "${{ secrets.ENV }}" > .env
- name: Deploy with rsync
uses: burnett01/rsync-deployments@5.2
with:
switches: -avzr --quiet --delete
path: ./
remote_path: /var/www/screenshot-service-bun
remote_host: ${{ secrets.HOST }}
remote_user: ${{ secrets.USERNAME }}
remote_key: ${{ secrets.SSH_KEY }}
- name: Restart pm2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
pm2 restart screenshot-service-bun