diff --git a/.github/workflows/NewActionWorkflow.yml b/.github/workflows/NewActionWorkflow.yml index b53b283..318a977 100644 --- a/.github/workflows/NewActionWorkflow.yml +++ b/.github/workflows/NewActionWorkflow.yml @@ -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: @@ -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 @@ -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: .