Skip to content

Update README.md

Update README.md #111

Workflow file for this run

# 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 - risedc
defaults:
run:
working-directory: rise-dc-app
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read #This is required for actions/checkout
steps:
- uses: actions/checkout@v4
- name: Log directory
run: pwd
- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: '22.x'
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm run test --if-present
- name: Copy package.json for deployment
run: cp package.json dist/
- name: Copy startup.sh for deployment
run: cp startup.sh dist/
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: node-app
path: rise-dc-app/dist
if-no-files-found: error
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
id-token: write #This is required for requesting the JWT
contents: read #This is required for actions/checkout
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: node-app
- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_4838F9DC7EFF4D1D90A3793EE63A6F6F }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_0F7E50865FA04882BD511D1073B5E293 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_D16891D68CFC4E038505A6D6C1BB225E }}
- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
with:
app-name: 'risedc'
slot-name: 'Production'
package: .