Use script to deploy api (#27)
All checks were successful
Game Ideas deploy / build-test-deploy (push) Successful in 1m17s

Reviewed-on: #27
Co-authored-by: egamorf76 <maxime.adler76@gmail.com>
Co-committed-by: egamorf76 <maxime.adler76@gmail.com>
This commit was merged in pull request #27.
This commit is contained in:
2025-04-28 01:07:04 +02:00
committed by Egamorf
parent 6532d7a6d6
commit f749d6528e

View File

@@ -56,17 +56,6 @@ jobs:
source: "./blazor/*" source: "./blazor/*"
target: "/var/www/" target: "/var/www/"
- name: Update Entity Framework API on server
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.DEV_HOST }}
username: ${{ secrets.DEV_USERNAME }}
password: ${{ secrets.DEV_PASSWORD }}
port: ${{ secrets.DEV_PORT }}
script: |
cd /home/gameideas/api
dotnet ef database update --no-build
- name: Start API on server - name: Start API on server
uses: appleboy/ssh-action@v1 uses: appleboy/ssh-action@v1
with: with:
@@ -74,7 +63,4 @@ jobs:
username: ${{ secrets.DEV_USERNAME }} username: ${{ secrets.DEV_USERNAME }}
password: ${{ secrets.DEV_PASSWORD }} password: ${{ secrets.DEV_PASSWORD }}
port: ${{ secrets.DEV_PORT }} port: ${{ secrets.DEV_PORT }}
script: | script: bash ./update-api.sh
pkill -f "GameIdeas.WebAPI" || true
cd /home/gameideas/api
nohup dotnet GameIdeas.WebAPI.dll > api.log 2>&1 &