From 82b47c8dd938c02ad7159141dff83264d7acef06 Mon Sep 17 00:00:00 2001 From: induanoopgrethena Date: Fri, 11 Oct 2024 00:14:15 +0530 Subject: [PATCH 1/3] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/master_aichatbot.yml | 62 ++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/master_aichatbot.yml diff --git a/.github/workflows/master_aichatbot.yml b/.github/workflows/master_aichatbot.yml new file mode 100644 index 0000000..38c7179 --- /dev/null +++ b/.github/workflows/master_aichatbot.yml @@ -0,0 +1,62 @@ +# 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 - aichatbot + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js version + uses: actions/setup-node@v3 + with: + node-version: '20.x' + + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm run test --if-present + + - name: Zip artifact for deployment + run: zip release.zip ./* -r + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v4 + with: + name: node-app + path: release.zip + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v4 + with: + name: node-app + + - name: Unzip artifact for deployment + run: unzip release.zip + + - name: 'Deploy to Azure Web App' + id: deploy-to-webapp + uses: azure/webapps-deploy@v3 + with: + app-name: 'aichatbot' + slot-name: 'Production' + package: . + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_980043F9A9BC48D2AB898AD2D61C59CA }} \ No newline at end of file From 4ef9f94b8f4fe4265c668622f5ac6c841f834272 Mon Sep 17 00:00:00 2001 From: induanoopgrethena Date: Fri, 11 Oct 2024 00:17:14 +0530 Subject: [PATCH 2/3] Remove the Azure App Service build and deployment workflow config --- .github/workflows/master_aichatbot.yml | 62 -------------------------- 1 file changed, 62 deletions(-) delete mode 100644 .github/workflows/master_aichatbot.yml diff --git a/.github/workflows/master_aichatbot.yml b/.github/workflows/master_aichatbot.yml deleted file mode 100644 index 38c7179..0000000 --- a/.github/workflows/master_aichatbot.yml +++ /dev/null @@ -1,62 +0,0 @@ -# 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 - aichatbot - -on: - push: - branches: - - master - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Node.js version - uses: actions/setup-node@v3 - with: - node-version: '20.x' - - - name: npm install, build, and test - run: | - npm install - npm run build --if-present - npm run test --if-present - - - name: Zip artifact for deployment - run: zip release.zip ./* -r - - - name: Upload artifact for deployment job - uses: actions/upload-artifact@v4 - with: - name: node-app - path: release.zip - - deploy: - runs-on: ubuntu-latest - needs: build - environment: - name: 'Production' - url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} - - steps: - - name: Download artifact from build job - uses: actions/download-artifact@v4 - with: - name: node-app - - - name: Unzip artifact for deployment - run: unzip release.zip - - - name: 'Deploy to Azure Web App' - id: deploy-to-webapp - uses: azure/webapps-deploy@v3 - with: - app-name: 'aichatbot' - slot-name: 'Production' - package: . - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_980043F9A9BC48D2AB898AD2D61C59CA }} \ No newline at end of file From e2b25ca666ad70d02a2daaf7bb8d8053bdc373cc Mon Sep 17 00:00:00 2001 From: induanoopgrethena Date: Fri, 11 Oct 2024 00:22:08 +0530 Subject: [PATCH 3/3] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/master_aichatbot.yml | 62 ++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/master_aichatbot.yml diff --git a/.github/workflows/master_aichatbot.yml b/.github/workflows/master_aichatbot.yml new file mode 100644 index 0000000..c40ea93 --- /dev/null +++ b/.github/workflows/master_aichatbot.yml @@ -0,0 +1,62 @@ +# 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 - aichatbot + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js version + uses: actions/setup-node@v3 + with: + node-version: '20.x' + + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm run test --if-present + + - name: Zip artifact for deployment + run: zip release.zip ./* -r + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v4 + with: + name: node-app + path: release.zip + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v4 + with: + name: node-app + + - name: Unzip artifact for deployment + run: unzip release.zip + + - name: 'Deploy to Azure Web App' + id: deploy-to-webapp + uses: azure/webapps-deploy@v3 + with: + app-name: 'aichatbot' + slot-name: 'Production' + package: . + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_E9EF6101105C42A48C597DDF6E021A1B }} \ No newline at end of file