Skip to content

Workflow file for this run

name: Deploy .NET Application to VPS
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
name: Checkout code
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: '9.0.x'
- name: Restore dependencies
run: dotnet restore src/RadioModBackend.NET.csproj
- name: Publish
run: dotnet publish src/RadioModBackend.NET.csproj --configuration Release --no-restore --runtime linux-x64 --output ./publish
- name: Upload files via SCP
uses: appleboy/[email protected]
with:
host: ${{ secrets.VPS_SSH_HOST }}
username: ${{ secrets.VPS_SSH_USERNAME2 }}
key: ${{ secrets.VPS_SSH_PRIVATE_KEY }}
port: ${{ secrets.VPS_SSH_PORT }}
source: ./publish/RadioModBackend.NET
target: ${{ secrets.VPS_SSH_PATH2 }}
strip_components: 2
- name: Restart app via SSH
uses: appleboy/[email protected]
with:
host: ${{ secrets.VPS_SSH_HOST }}
username: ${{ secrets.VPS_SSH_USERNAME2 }}
key: ${{ secrets.VPS_SSH_PRIVATE_KEY }}
port: ${{ secrets.VPS_SSH_PORT }}
script: |
chmod +x ~/RadioModBackend.NET
~/radiomod.sh restart