From de8cc686c64d131e9e2c7157d685f9b0df5fd172 Mon Sep 17 00:00:00 2001 From: Kenneth Chow Date: Wed, 29 Nov 2023 15:16:07 -0600 Subject: [PATCH] trying a new thing --- .github/workflows/main_dibbs-demo-site.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main_dibbs-demo-site.yml b/.github/workflows/main_dibbs-demo-site.yml index d5a20ca5..94076fe0 100644 --- a/.github/workflows/main_dibbs-demo-site.yml +++ b/.github/workflows/main_dibbs-demo-site.yml @@ -1,6 +1,3 @@ -# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy -# More GitHub Actions for Azure: https://github.com/Azure/actions - name: Build and deploy Node.js app to Azure Web App - dibbs-demo-site on: @@ -12,38 +9,38 @@ on: jobs: build: runs-on: ubuntu-latest - defaults: - run: - working-directory: ./front-end - steps: - uses: actions/checkout@v4 + # Add a step to change to the front-end directory + - name: Change to front-end directory + run: cd front-end + - name: Set up Node.js version uses: actions/setup-node@v3 with: node-version: '20.x' + working-directory: ./front-end - name: npm install, build, and test run: | npm install npm run build --if-present npm run test --if-present + working-directory: ./front-end - name: Zip artifact for deployment run: zip release.zip ./* -r + working-directory: ./front-end - name: Upload artifact for deployment job uses: actions/upload-artifact@v3 with: name: node-app - path: release.zip + path: front-end/release.zip deploy: runs-on: ubuntu-latest - defaults: - run: - working-directory: ./front-end needs: build environment: name: 'Production' @@ -57,6 +54,7 @@ jobs: - name: Unzip artifact for deployment run: unzip release.zip + working-directory: ./front-end - name: 'Deploy to Azure Web App' id: deploy-to-webapp @@ -64,5 +62,5 @@ jobs: with: app-name: 'dibbs-demo-site' slot-name: 'Production' - package: . + package: front-end publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D615B933250E4E6F91AA277A73AD6188 }}