From 4a7922927f1783c3dcb8f7c6bab869dbc84c95a4 Mon Sep 17 00:00:00 2001 From: Hot-Tutorials <61880709+Hot-Tutorials@users.noreply.github.com> Date: Mon, 22 Nov 2021 20:33:43 +0100 Subject: [PATCH 1/6] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/deployment_mcdocker.yml | 56 +++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/deployment_mcdocker.yml diff --git a/.github/workflows/deployment_mcdocker.yml b/.github/workflows/deployment_mcdocker.yml new file mode 100644 index 0000000..477509e --- /dev/null +++ b/.github/workflows/deployment_mcdocker.yml @@ -0,0 +1,56 @@ +# 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 - mcdocker + +on: + push: + branches: + - deployment + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Node.js version + uses: actions/setup-node@v1 + with: + node-version: '14.x' + + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm run test --if-present + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v2 + with: + name: node-app + path: . + + 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@v2 + with: + name: node-app + + - name: 'Deploy to Azure Web App' + id: deploy-to-webapp + uses: azure/webapps-deploy@v2 + with: + app-name: 'mcdocker' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_301DAAB15A8241C4901F8D90F855DC74 }} + package: . From ea77898d7fc3e9f8037e843802aa87a0d4089d2e Mon Sep 17 00:00:00 2001 From: Hot-Tutorials <61880709+Hot-Tutorials@users.noreply.github.com> Date: Tue, 23 Nov 2021 19:22:05 +0100 Subject: [PATCH 2/6] Update package.json --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 29f18df..bcc919c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "license": "MIT", "scripts": { "dev": "ts-node-dev src/index.ts", - "start": "node dist/index.js" + "start": "node dist/index.js", + "build": "tsc" }, "devDependencies": { "@types/bcrypt": "^5.0.0", From 66520f0d4e2e719d77882730bb880cfc7a71400e Mon Sep 17 00:00:00 2001 From: Hot-Tutorials <61880709+Hot-Tutorials@users.noreply.github.com> Date: Tue, 23 Nov 2021 19:22:33 +0100 Subject: [PATCH 3/6] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/deployment_mcdocker-api.yml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/deployment_mcdocker-api.yml diff --git a/.github/workflows/deployment_mcdocker-api.yml b/.github/workflows/deployment_mcdocker-api.yml new file mode 100644 index 0000000..794cfdb --- /dev/null +++ b/.github/workflows/deployment_mcdocker-api.yml @@ -0,0 +1,56 @@ +# 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 - mcdocker-api + +on: + push: + branches: + - deployment + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Node.js version + uses: actions/setup-node@v1 + with: + node-version: '14.x' + + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm run test --if-present + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v2 + with: + name: node-app + path: . + + 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@v2 + with: + name: node-app + + - name: 'Deploy to Azure Web App' + id: deploy-to-webapp + uses: azure/webapps-deploy@v2 + with: + app-name: 'mcdocker-api' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_08E7ECAE3D564A0A8C1FA4DB8AAFE58A }} + package: . From c3607e9dbf3855e88a320b18cc1fb7a9b0586e79 Mon Sep 17 00:00:00 2001 From: Hot-Tutorials <61880709+Hot-Tutorials@users.noreply.github.com> Date: Wed, 24 Nov 2021 14:22:25 +0100 Subject: [PATCH 4/6] Delete deployment_mcdocker.yml --- .github/workflows/deployment_mcdocker.yml | 56 ----------------------- 1 file changed, 56 deletions(-) delete mode 100644 .github/workflows/deployment_mcdocker.yml diff --git a/.github/workflows/deployment_mcdocker.yml b/.github/workflows/deployment_mcdocker.yml deleted file mode 100644 index 477509e..0000000 --- a/.github/workflows/deployment_mcdocker.yml +++ /dev/null @@ -1,56 +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 - mcdocker - -on: - push: - branches: - - deployment - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up Node.js version - uses: actions/setup-node@v1 - with: - node-version: '14.x' - - - name: npm install, build, and test - run: | - npm install - npm run build --if-present - npm run test --if-present - - - name: Upload artifact for deployment job - uses: actions/upload-artifact@v2 - with: - name: node-app - path: . - - 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@v2 - with: - name: node-app - - - name: 'Deploy to Azure Web App' - id: deploy-to-webapp - uses: azure/webapps-deploy@v2 - with: - app-name: 'mcdocker' - slot-name: 'Production' - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_301DAAB15A8241C4901F8D90F855DC74 }} - package: . From 57575757556713965eb5a39a93ae0791fd909bea Mon Sep 17 00:00:00 2001 From: Hot-Tutorials <61880709+Hot-Tutorials@users.noreply.github.com> Date: Wed, 24 Nov 2021 14:37:57 +0100 Subject: [PATCH 5/6] Update deployment_mcdocker-api.yml --- .github/workflows/deployment_mcdocker-api.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deployment_mcdocker-api.yml b/.github/workflows/deployment_mcdocker-api.yml index 794cfdb..5bfa344 100644 --- a/.github/workflows/deployment_mcdocker-api.yml +++ b/.github/workflows/deployment_mcdocker-api.yml @@ -21,11 +21,10 @@ jobs: with: node-version: '14.x' - - name: npm install, build, and test + - name: yarn install and build run: | - npm install - npm run build --if-present - npm run test --if-present + yarn + yarn build - name: Upload artifact for deployment job uses: actions/upload-artifact@v2 From ecfcf25a1e400d8be95d63a422d49e05f3ac25ce Mon Sep 17 00:00:00 2001 From: Hot-Tutorials <61880709+Hot-Tutorials@users.noreply.github.com> Date: Wed, 24 Nov 2021 14:42:10 +0100 Subject: [PATCH 6/6] Remove the Azure App Service build and deployment workflow config --- .github/workflows/deployment_mcdocker-api.yml | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 .github/workflows/deployment_mcdocker-api.yml diff --git a/.github/workflows/deployment_mcdocker-api.yml b/.github/workflows/deployment_mcdocker-api.yml deleted file mode 100644 index 5bfa344..0000000 --- a/.github/workflows/deployment_mcdocker-api.yml +++ /dev/null @@ -1,55 +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 - mcdocker-api - -on: - push: - branches: - - deployment - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up Node.js version - uses: actions/setup-node@v1 - with: - node-version: '14.x' - - - name: yarn install and build - run: | - yarn - yarn build - - - name: Upload artifact for deployment job - uses: actions/upload-artifact@v2 - with: - name: node-app - path: . - - 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@v2 - with: - name: node-app - - - name: 'Deploy to Azure Web App' - id: deploy-to-webapp - uses: azure/webapps-deploy@v2 - with: - app-name: 'mcdocker-api' - slot-name: 'Production' - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_08E7ECAE3D564A0A8C1FA4DB8AAFE58A }} - package: .