Skip to content

Commit

Permalink
Updated workflow
Browse files Browse the repository at this point in the history
app-name: "it75-app-c8a-ui-01"
  • Loading branch information
dhayanands committed Dec 4, 2023
1 parent 58c09f3 commit 56e1589
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/main_it75-web-c8a-sampleapp-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,37 @@ on:
branches:
- main
workflow_dispatch:

env:
AZURE_WEBAPP_PACKAGE_PATH: "." # set this to the path to your web app project, defaults to the repository root
NODE_VERSION: "18" # set this to the node version to use

jobs:
build:
runs-on: windows-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: '18.x'
node-version: "18.17"

- name: npm install, build, and test
run: |
npm install
npm run build --if-present
# npm run test --if-present
- name: Zip artifact for deployment
working-directory: ./build
run: zip ./release.zip ./* -r

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: node-app
path: .
name: release.zip
path: ./build

deploy:
runs-on: ubuntu-latest
Expand All @@ -44,13 +51,18 @@ jobs:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: node-app
name: release.zip

- name: unzip artifact for deployment
run: |
unzip -o release.zip
rm -rf release.zip
- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v2
id: deploy-to-webapp
with:
app-name: 'it75-web-c8a-sampleapp-dev'
slot-name: 'Production'
package: .
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_27F69A0848FD4D19AA9C8C996C814615 }}

0 comments on commit 56e1589

Please sign in to comment.