-
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.31 KB
/
dotnet.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
name: Release to Exilence Backend CI/CD
on:
workflow_dispatch:
defaults:
run:
working-directory: ExilenceNextBackend
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Setup .NET Core 3.1.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Publish release artifacts
run: dotnet publish -c release -r ubuntu.18.04-x64 -o deploy
- name: Stop backend service
uses: garygrossgarten/[email protected]
with:
command: sudo systemctl stop exilence-next.service
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
password: ${{ secrets.SECRET }}
- name: Copy release artefacts
uses: garygrossgarten/[email protected]
with:
local: /home/runner/work/exilence-next/exilence-next/ExilenceNextBackend/deploy
remote: ${{ secrets.TARGET }}
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
password: ${{ secrets.SECRET }}
- name: Start backend service
uses: garygrossgarten/[email protected]
with:
command: sudo systemctl start exilence-next.service
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
password: ${{ secrets.SECRET }}