Skip to content

Commit

Permalink
ci: update deploy configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Salgado2004 authored Jul 5, 2024
1 parent 2437676 commit 6a970ba
Showing 1 changed file with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,42 @@ jobs:
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: 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: .
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
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: 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
Expand All @@ -62,4 +65,4 @@ jobs:
app-name: 'NuvemProExams'
slot-name: 'Production'
package: .


0 comments on commit 6a970ba

Please sign in to comment.