Skip to content

Commit

Permalink
Add or update the Azure App Service build and deployment workflow config
Browse files Browse the repository at this point in the history
  • Loading branch information
venkyvajrala committed Dec 4, 2023
1 parent 038c253 commit e32ac65
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/master_todomatic-todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- uses: actions/checkout@v4

Expand All @@ -29,14 +27,36 @@ jobs:
npm run build --if-present
npm run test --if-present
# - name: Unzip artifact for deployment
# run: unzip release.zip
- name: Zip artifact for deployment
run: zip release.zip ./* -r

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: node-app
path: release.zip

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: node-app

- name: Unzip artifact for deployment
run: unzip release.zip

- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'todomatic-todo'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_9CD41EFC39D041A7BCE5B20C6305299C }}
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_A937B62868DD45F998CC3A0FE498C77A }}
package: .

0 comments on commit e32ac65

Please sign in to comment.