diff --git a/.github/workflows/master_maloy15.yml b/.github/workflows/master_maloy15.yml new file mode 100644 index 00000000..9db0b671 --- /dev/null +++ b/.github/workflows/master_maloy15.yml @@ -0,0 +1,72 @@ +# 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 - maloy15 + +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: Install dependencies + run: | + if [ -e yarn.lock ]; then + yarn install --frozen-lockfile + elif [ -e package-lock.json ]; then + npm ci + else + npm i + fi + + - 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@v3 + 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@v3 + 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@v2 + with: + app-name: 'maloy15' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_12CEE958527A4A869F4659F5AF678E96 }} + package: . diff --git a/Kubernetes/build-and-deploy-docker-image-aks-using-manifests.yml b/Kubernetes/build-and-deploy-docker-image-aks-using-manifests.yml index 6b998123..f483e441 100644 --- a/Kubernetes/build-and-deploy-docker-image-aks-using-manifests.yml +++ b/Kubernetes/build-and-deploy-docker-image-aks-using-manifests.yml @@ -12,6 +12,8 @@ on: [push] # Environment variables available to all jobs and steps in this workflow +#CHECK + env: REGISTRY_NAME: my-registry-name CLUSTER_NAME: my-cluster-name