-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.05 KB
/
deploy.yml
File metadata and controls
43 lines (37 loc) · 1.05 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
name: Deploy
on:
push:
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
- '**.json'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Copy repository contents
uses: appleboy/scp-action@master
env:
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PORT: ${{ secrets.PORT }}
KEY: ${{ secrets.SSHKEY }}
with:
source: "."
target: "/home/ubuntu/txtcreatorapi"
- name: Executing remote command
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PORT: ${{ secrets.PORT }}
KEY: ${{ secrets.SSHKEY }}
script: |
cd txtcreatorapi
screen -X -S "txtcreatorapi" quit
/home/ubuntu/.dotnet/dotnet build --configuration Release
cd bin/Release/net7.0
nohup screen -d -m -S txtcreatorapi sudo /home/ubuntu/.dotnet/dotnet TxtCreatorAPI.dll --urls http://*:80