Fix workflow #26
@@ -6,7 +6,7 @@ on:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build_blazor_app:
|
||||
build_test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
||||
@@ -31,10 +31,10 @@ jobs:
|
||||
run: dotnet test ./src/GameIdeas/Server/GameIdeas.WebAPI.Tests/GameIdeas.WebAPI.Tests.csproj --configuration Release
|
||||
|
||||
- name: Publish API
|
||||
run: dotnet publish ./src/GameIdeas/Server/GameIdeas.WebAPI/GameIdeas.WebAPI.csproj --configuration Release --output ./publish/api
|
||||
run: dotnet publish ./src/GameIdeas/Server/GameIdeas.WebAPI/GameIdeas.WebAPI.csproj --configuration Release --output ./api
|
||||
|
||||
- name: Publish Blazor App
|
||||
run: dotnet publish ./src/GameIdeas/Client/GameIdeas.BlazorApp/GameIdeas.BlazorApp.csproj --configuration Release --output ./publish/blazor
|
||||
run: dotnet publish ./src/GameIdeas/Client/GameIdeas.BlazorApp/GameIdeas.BlazorApp.csproj --configuration Release --output ./blazor
|
||||
|
||||
- name: Copy API to Server
|
||||
uses: appleboy/scp-action@v1
|
||||
@@ -43,8 +43,8 @@ jobs:
|
||||
username: ${{ secrets.DEV_USERNAME }}
|
||||
password: ${{ secrets.DEV_PASSWORD }}
|
||||
port: ${{ secrets.DEV_PORT }}
|
||||
source: "./publish/api/*"
|
||||
target: "/home/gameideas/api"
|
||||
source: "./api/*"
|
||||
target: "/home/gameideas"
|
||||
|
||||
- name: Copy Blazor App to Server
|
||||
uses: appleboy/scp-action@v1
|
||||
@@ -53,8 +53,8 @@ jobs:
|
||||
username: ${{ secrets.DEV_USERNAME }}
|
||||
password: ${{ secrets.DEV_PASSWORD }}
|
||||
port: ${{ secrets.DEV_PORT }}
|
||||
source: "./publish/blazor/*"
|
||||
target: "/home/gameideas/blazor"
|
||||
source: "./blazor/*"
|
||||
target: "/var/www/"
|
||||
|
||||
- name: Update Entity Framework API on server
|
||||
uses: appleboy/ssh-action@v1
|
||||
@@ -78,15 +78,3 @@ jobs:
|
||||
pkill -f "GameIdeas.WebAPI" || true
|
||||
cd /home/gameideas/api
|
||||
nohup dotnet GameIdeas.WebAPI.dll > api.log 2>&1 &
|
||||
|
||||
- name: Start Blazor App 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: |
|
||||
pkill -f "GameIdeas.BlazorApp" || true
|
||||
cd /home/gameideas/blazor
|
||||
nohup dotnet GameIdeas.BlazorApp.dll > blazor.log 2>&1 &
|
||||
Reference in New Issue
Block a user