-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.01 KB
/
Copy pathdeploy.yml
File metadata and controls
47 lines (39 loc) · 1.01 KB
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
44
45
46
47
name: Deploy freshpass Website
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Deploy to server
uses: burnett01/rsync-deployments@5.2
with:
switches: -avzr --delete
path: out/
remote_path: /var/www/freshpass/
remote_host: ${{ secrets.HOST }}
remote_user: ${{ secrets.USERNAME }}
remote_key: ${{ secrets.SSH_KEY }}
- name: Restart nginx
uses: appleboy/ssh-action@v0.1.5
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: 22
timeout: 60s
command_timeout: 5m
script: |
sudo systemctl restart nginx