Files
Ngino/.github/workflows/deploy.yml
T
lucretia.dietz 6278bfbcfc
Build & Deploy / build (push) Failing after 1m13s
fix: fixes name in various files
2026-07-20 07:54:02 +02:00

48 lines
1.3 KiB
YAML

name: Build & Deploy
on:
push:
branches: [ main, ci-* ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore dependencies
run: dotnet restore src/Ngino.Server
- name: Build
run: dotnet build src/Ngino.Server --configuration Release --no-restore
- name: Publish
run: dotnet publish src/Ngino.Server -c Release -o publish
- name: Copy files to server
uses: appleboy/scp-action@v1.0.0
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
password: ${{ secrets.DEPLOY_SSH_PASSWORD }}
port: ${{ secrets.DEPLOY_SSH_PORT }}
source: "publish/*"
target: "/var/www/Ngino"
strip_components: 1
- name: Restart app
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
password: ${{ secrets.DEPLOY_SSH_PASSWORD }}
port: ${{ secrets.DEPLOY_SSH_PORT }}
script: |
sudo systemctl restart Ngino.service