Merge pull request #251 from it-beard/develop #147
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy apps to Production | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build-and-deploy-pds-web: | |
name: Deploy Pds.Web | |
runs-on: ubuntu-latest | |
environment: pds_prod | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
working-directory: Pds/Pds.Web | |
- name: Build Pds.Web | |
run: dotnet build --no-restore --configuration Release | |
working-directory: Pds/Pds.Web | |
- name: Publish Pds.Web | |
run: dotnet publish -c Release -o pds_web | |
working-directory: Pds/Pds.Web | |
- name: 'Deploy Pds.Web to Azure WebApp' | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: ${{ env.PDS_WEB_AZURE_WEBAPP_NAME }} | |
publish-profile: ${{ secrets.PROD_PDS_WEB_AZURE_PUBLISH_PROFILE }} | |
package: Pds/Pds.Web/pds_web/ | |
build-and-deploy-pds-api: | |
name: Deploy Pds.Api | |
runs-on: ubuntu-latest | |
environment: pds_prod | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
working-directory: Pds/Pds.Api | |
- name: Build Pds.Api | |
run: dotnet build --no-restore --configuration Release | |
working-directory: Pds/Pds.Api | |
- name: Publish Pds.Api | |
run: dotnet publish -c Release -o pds_api | |
working-directory: Pds/Pds.Api | |
- name: 'Deploy Pds.Api to Azure WebApp' | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: ${{ env.PDS_API_AZURE_WEBAPP_NAME }} | |
publish-profile: ${{ secrets.PROD_PDS_API_AZURE_PUBLISH_PROFILE }} | |
package: Pds/Pds.Api/pds_api/ | |