Skip to content

Commit

Permalink
Update NewActionWorkflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Waterclone committed Aug 30, 2023
1 parent 45fb22e commit 5a3920e
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions .github/workflows/NewActionWorkflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
- develop

env:
AZURE_WEBAPP_NAME: L5-M3-Test
AZURE_WEBAPP_NAME2: L5-M3-2
AZURE_WEBAPP_PACKAGE_PATH: '.'
NODE_VERSION: '16.x'

jobs:
Expand Down Expand Up @@ -42,22 +39,23 @@ jobs:
needs: build
if: github.event_name == 'pull_request' && github.base_ref == 'refs/heads/develop'
environment:
name: 'production'
name: 'test'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

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

- name: 'Deploy to Azure Webapp Test (L5-M3-Test)'
- name: 'Deploy to Azure Web App Test (L5-M3-Test)'
id: deploy-to-webapp
uses: azure/webapps-deploy@85270a1854658d167ab239bce43949edb336fa7c
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
app-name: 'L5-M3-Test'
slot-name: 'Test'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_8E171E9ED47D41E49585227E738F3014 }}
package: .

deploy-to-production:
runs-on: ubuntu-latest
Expand All @@ -66,17 +64,18 @@ jobs:
environment:
name: 'production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

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

- name: 'Deploy to Azure Webapp Production (L5-M3-2)'
- name: 'Deploy to Azure Web App Production (L5-M3-2)'
id: deploy-to-webapp
uses: azure/webapps-deploy@85270a1854658d167ab239bce43949edb336fa7c
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME2 }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
app-name: 'L5-M3-2'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_0694010A467345BC83A7673AB4B541DA }}
package: .

0 comments on commit 5a3920e

Please sign in to comment.