frontend_nyla/.github/workflows/int_poweron-nyla-int.yml
idittrich-valueon 98445d9c5f fixed yml
2025-06-04 21:49:42 +02:00

66 lines
No EOL
1.7 KiB
YAML

name: Build and deploy Node.js app to Azure Web App - poweron-nyla-int
on:
push:
branches:
- int
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js version
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: npm install, build
run: |
npm ci
npm run build --if-present
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: node-app
path: |
.
!node_modules
!.git
!.github
!README.md
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@v4
with:
name: node-app
- name: Login to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_F22B84BEF16242F48E913761794EFA64 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_91A621FECC4E4239B35E8842FAD714A4 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_89F1F8736D6D4566AF238A83525E0BD5 }}
- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'poweron-nyla-int'
slot-name: 'Production'
package: .