From 87a9b8e42b0aebd2092263a5fb1d4ae03c4ba3e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20J=2E=20Salda=C3=B1a?= Date: Wed, 17 Apr 2024 23:00:38 +0200 Subject: [PATCH] Add or update the Azure App Service build and deployment workflow config --- .../workflows/main_danieljsaldana-backend.yml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/main_danieljsaldana-backend.yml diff --git a/.github/workflows/main_danieljsaldana-backend.yml b/.github/workflows/main_danieljsaldana-backend.yml new file mode 100644 index 0000000..1a0181e --- /dev/null +++ b/.github/workflows/main_danieljsaldana-backend.yml @@ -0,0 +1,39 @@ +# Docs for the Azure Web Apps Deploy action: https://go.microsoft.com/fwlink/?linkid=2134798 +# More GitHub Actions for Azure: https://go.microsoft.com/fwlink/?linkid=2135048 + +name: Azure App Service - danieljsaldana-backend(Production), Build and deploy NodeJS app + +on: + push: + branches: + - main + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + # checkout the repo + - name: 'Checkout Github Action' + uses: actions/checkout@master + + + - name: Set up Node.js version + uses: actions/setup-node@v1 + with: + node-version: '20-lts' + + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm run test --if-present + + - name: Run Azure webapp deploy action using publish profile credentials + uses: azure/webapps-deploy@v2 + with: + app-name: danieljsaldana-backend + slot-name: Production + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_BA494F48311046EF87085F8BBA1D145F }} + package: . +