Skip to content

Update project versions and refactor China deployment logic #59

Update project versions and refactor China deployment logic

Update project versions and refactor China deployment logic #59

Workflow file for this run

name: API Build and Deploy
on:
push:
branches:
- master
paths:
- src/API/**
env:
AZURE_WEBAPP_NAME: elf-ediwang
AZURE_WEBAPP_PACKAGE_PATH: '.'
DOTNET_VERSION: '8.0.x'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@master
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: dotnet build and publish
working-directory: ./src/API
run: |
dotnet build --configuration Release
dotnet publish -c Release --no-build -o '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/elfapi'
- name: 'Run Azure webapp deploy action using publish profile credentials'
uses: azure/webapps-deploy@v3
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }} # Replace with your app name
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} # Define secret variable in repository settings as per action documentation
package: '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/src/API/elfapi'