Skip to content

Commit

Permalink
trying a new thing
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethSkylight committed Nov 29, 2023
1 parent 4f12aaf commit de8cc68
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/main_dibbs-demo-site.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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'
Expand All @@ -57,12 +54,13 @@ jobs:

- name: Unzip artifact for deployment
run: unzip release.zip
working-directory: ./front-end

- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'dibbs-demo-site'
slot-name: 'Production'
package: .
package: front-end
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D615B933250E4E6F91AA277A73AD6188 }}

0 comments on commit de8cc68

Please sign in to comment.