Skip to content

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
Salgado2004 authored Jul 5, 2024
2 parents d619e0c + 6a970ba commit 5c4ff89
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/deploy_production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# 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 - NuvemProExams

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: windows-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
run: npm install

- name: Install Angular CLI
run: npm install -g @angular/cli

- name: Build the Angular app
run: ng build --base-href "https://nuvemproexams.azurewebsites.net/" --configuration production

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

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
permissions:
id-token: write #This is required for requesting the JWT

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: node-app

- name: Login to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_255DE68DF19D4337928848D6677D7D9F }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_4F5AA5E9664D459587FC032E6A60994C }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_80C363F1D4414C45AC356BD1D102A380 }}

- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v2
id: deploy-to-webapp
with:
app-name: 'NuvemProExams'
slot-name: 'Production'
package: .

0 comments on commit 5c4ff89

Please sign in to comment.