diff --git a/.github/workflows/main_dibbs-demo-site.yml b/.github/workflows/main_dibbs-demo-site.yml index 94076fe0..86419a0b 100644 --- a/.github/workflows/main_dibbs-demo-site.yml +++ b/.github/workflows/main_dibbs-demo-site.yml @@ -1,3 +1,6 @@ +# 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: @@ -9,38 +12,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: front-end/release.zip + path: release.zip deploy: runs-on: ubuntu-latest + defaults: + run: + working-directory: ./front-end needs: build environment: name: 'Production' @@ -62,5 +65,5 @@ jobs: with: app-name: 'dibbs-demo-site' slot-name: 'Production' - package: front-end + package: . publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D615B933250E4E6F91AA277A73AD6188 }}