-
Notifications
You must be signed in to change notification settings - Fork 7
57 lines (47 loc) · 1.5 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Deploy WebSite
on:
push:
branches: [ deploy ]
# workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET SDK
uses: actions/[email protected]
with:
dotnet-version: 5.0.x
- name: Run Publish
run: dotnet publish src/BulmaRazorServer/BulmaRazorServer.csproj -c Release -o publish
- name: SFTP Upload Main Files
uses: wlixcc/[email protected]
with:
username: ${{secrets.USERNAME}}
server: ${{secrets.SERVER}}
port: ${{secrets.PORT}}
ssh_private_key: ${{secrets.SSH_PRIVATE_KEY}}
local_path: ./publish/*
remote_path: ./publish/
- name: Restart Service
uses: appleboy/[email protected]
with:
host: ${{secrets.SERVER}}
port: ${{secrets.PORT}}
password: ${{secrets.PASSWORD}}
username: ${{secrets.USERNAME}}
script:
bash ~/deploy.sh
uploadPages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: SFTP Upload Pages
uses: wlixcc/[email protected]
with:
username: ${{secrets.USERNAME}}
server: ${{secrets.SERVER}}
port: ${{secrets.PORT}}
ssh_private_key: ${{secrets.SSH_PRIVATE_KEY}}
local_path: ./src/BulmaRazorServer/Pages/*
remote_path: ./publish/Pages/