Skip to content

fix(Github actions) : previously -C now --configuration #2

fix(Github actions) : previously -C now --configuration

fix(Github actions) : previously -C now --configuration #2

Workflow file for this run

name: Build, publish and deploy to MonsterASP.NET
on: [push]
jobs:
build_and_deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Copy appsettings
shell: pwsh
run: |
Copy-Item .\Inv_Backend_NET\appsettings.Local.json .\Inv_Backend_NET\appsettings.Release.json -Force
- name: Configure appsettings
uses: microsoft/variable-substitution@v1
with:
files: '.\Inv_Backend_NET\appsettings.Release.json'
env:
ConnectionStrings.Inventory-Db: ${{ secrets.INVENTORY_DB_CONNECTION_STRING }}
JwtSettings.Key: ${{ secrets.JWT_SECRET_KEY }}
JwtSettings.Issuer: http://hezbi-inventory-system.runasp.net
JwtSettings.Audience: frontend-inventory-system
- name: Publish
run: dotnet publish Inv_Backend_NET/Inventory_Backend_NET.csproj --configuration Release --output ./publish --runtime win-x86
- name: Deploy to MonsterASP.NET via WebDeploy
uses: rasmusbuchholdt/simply-web-deploy@2.1.0
with:
website-name: ${{ secrets.WEBSITE_NAME }}
server-computer-name: ${{ secrets.SERVER_COMPUTER_NAME }}
server-username: ${{ secrets.SERVER_USERNAME }}
server-password: ${{ secrets.SERVER_PASSWORD }}