From 66fe060f18df10f6aeabb0f55f25d6dd722050ac Mon Sep 17 00:00:00 2001 From: Petter Annerwall Date: Wed, 23 Feb 2022 22:56:40 +0100 Subject: [PATCH] Update dotnet.yml --- .github/workflows/dotnet.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 60507cd8..a1402b95 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -19,9 +19,16 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.x - - name: Dotnet Publish + - name: Publish run: dotnet publish -c release -r ubuntu.18.04-x64 -o deploy - - name: Copy via ssh + - name: Stop service + uses: garygrossgarten/github-action-ssh@v0.3.0 + with: + command: sudo systemctl stop exilence-next.service + host: ${{ secrets.HOST }} + username: ${{ secrets.USER }} + password: ${{ secrets.SECRET }} + - name: Copy files uses: garygrossgarten/github-action-scp@v0.5.3 with: local: /home/runner/work/exilence-next/exilence-next/ExilenceNextBackend/deploy @@ -29,10 +36,10 @@ jobs: host: ${{ secrets.HOST }} username: ${{ secrets.USER }} password: ${{ secrets.SECRET }} - - name: Run SSH command + - name: Start service uses: garygrossgarten/github-action-ssh@v0.3.0 with: - command: sudo systemctl restart exilence-next.service + command: sudo systemctl start exilence-next.service host: ${{ secrets.HOST }} username: ${{ secrets.USER }} password: ${{ secrets.SECRET }}