Skip to content

Commit

Permalink
fix(Workflow): Modified the workflow to deploy the sveltekit-app
Browse files Browse the repository at this point in the history
  • Loading branch information
wadhia-yash committed Jul 8, 2024
1 parent 32e4ba0 commit 6139a92
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/web-app_web-app-prod.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 - web-app-prod

on:
Expand All @@ -23,10 +20,20 @@ jobs:

- name: npm install, build, and test
run: |
cd commanddash_web_app
npm install
npm run build --if-present
npm run test --if-present
working-directory: commanddash_web_app
- name: Zip artifact for deployment
run: |
cd commanddash_web_app/build
zip release.zip ./* -r
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: sveltekit-app
path: release.zip

deploy:
runs-on: ubuntu-latest
Expand All @@ -38,6 +45,14 @@ jobs:
id-token: write #This is required for requesting the JWT

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: sveltekit-app

- name: Unzip artifact for deployment
run: unzip release.zip -d deploy

- name: Login to Azure
uses: azure/login@v1
with:
Expand All @@ -51,8 +66,4 @@ jobs:
with:
app-name: "web-app-prod"
slot-name: "Production"
package: .

- name: Start the application
run: node build/index.js
working-directory: commanddash_web_app
package: deploy

0 comments on commit 6139a92

Please sign in to comment.