-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·37 lines (31 loc) · 1.06 KB
/
deploy_to_dev.yml
File metadata and controls
executable file
·37 lines (31 loc) · 1.06 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
# CI/CD Pipeline - Deploy to development server
name: deploy_to_dev
on:
push:
branches: [dev-server]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Dotnet publish
run: dotnet publish Kodesonen.sln -c Release -o build
- name: Deploy to dev-server
uses: garygrossgarten/github-action-scp@v0.6.0
with:
local: /home/runner/work/nettside-v2/nettside-v2/build
remote: ${{ secrets.REMOTE_TARGET }}
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
password: ${{ secrets.REMOTE_PASSWORD }}
- name: Restart web-dev service
uses: garygrossgarten/github-action-ssh@v0.5.0
with:
command: echo ${{ secrets.REMOTE_PASSWORD }} | sudo -S service kodesonen-web restart
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
password: ${{ secrets.REMOTE_PASSWORD }}