diff --git a/.github/workflows/node-express-with-zip.yml b/.github/workflows/node-express-with-zip.yml index a83a077..661f5d9 100644 --- a/.github/workflows/node-express-with-zip.yml +++ b/.github/workflows/node-express-with-zip.yml @@ -72,7 +72,7 @@ jobs: - name: 'Run Azure webapp deploy action' id: deploy-to-webapp - uses: azure/webapps-deploy@v2 + uses: azure/webapps-deploy@v3 with: app-name: ${{ vars.AZURE_WEBAPP_NAME }}-express slot-name: 'Production' diff --git a/.github/workflows/node-express-without-artifact.yml b/.github/workflows/node-express-without-artifact.yml index 2ef2b10..61b139c 100644 --- a/.github/workflows/node-express-without-artifact.yml +++ b/.github/workflows/node-express-without-artifact.yml @@ -48,11 +48,11 @@ jobs: - name: 'Run Azure webapp deploy action' id: deploy-to-webapp - uses: azure/webapps-deploy@v2 + uses: azure/webapps-deploy@v3 with: app-name: ${{ vars.AZURE_WEBAPP_NAME }}-express slot-name: 'Production' - package: ${{ env.WORKING_DIRECTORY }} + package: . - name: Az CLI Logout run: az logout diff --git a/.github/workflows/node-express.yml b/.github/workflows/node-express.yml index b7d2782..1d1b30a 100644 --- a/.github/workflows/node-express.yml +++ b/.github/workflows/node-express.yml @@ -8,7 +8,6 @@ on: workflow_dispatch: env: - NODE_VERSION: '16.x' WORKING_DIRECTORY: nodejs/express permissions: @@ -18,18 +17,16 @@ permissions: jobs: build-express: runs-on: ubuntu-latest - defaults: run: working-directory: ${{ env.WORKING_DIRECTORY }} - steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: - node-version: ${{ env.NODE_VERSION }} + node-version: '16.x' cache: 'npm' cache-dependency-path: ${{ env.WORKING_DIRECTORY }} @@ -40,7 +37,7 @@ jobs: npm run test --if-present - name: Upload artifact for deployment job - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: node-app path: ${{ env.WORKING_DIRECTORY }} @@ -51,26 +48,26 @@ jobs: environment: name: 'Production' url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} - steps: - name: Download artifact from build job - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: node-app - name: Az CLI Login uses: azure/login@v1 with: - client-id: ${{ vars.AZURE_CLIENT_ID }} - tenant-id: ${{ vars.AZURE_TENANT_ID }} - subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }} + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - - name: 'Deploy to Azure WebApp' + - name: 'Run Azure webapp deploy action' id: deploy-to-webapp - uses: azure/webapps-deploy@v2 + uses: azure/webapps-deploy@v3 with: - app-name: ${{ vars.AZURE_WEBAPP_NAME }} + app-name: ${{ vars.AZURE_WEBAPP_NAME }}-express slot-name: 'Production' + package: . - name: Az CLI Logout run: az logout