06 - CI/CD (Dedicated)¶
Automate build and deployment with GitHub Actions and environment gates.
Prerequisites¶
- You completed 05 - Infrastructure as Code.
- You have a GitHub repository with your Node.js Function App code.
What You'll Build¶
- A GitHub Actions workflow that builds and deploys your Node.js Functions app on each push to
main. - Release health validation from runtime logs after the deployment finishes.
Infrastructure Context
Plan: Dedicated (B1) | CI/CD: GitHub Actions | Deploy: Publish profile
GitHub Actions deploys to the Dedicated Function App using a publish profile stored as a repository secret. The workflow runs npm ci, optional tests, and then uses Azure/functions-action to deploy the package.
flowchart LR
GH[GitHub\nmain branch] -->|push| GA[GitHub Actions\nubuntu-latest]
GA -->|npm ci + test| BUILD[Build Package]
BUILD -->|functions-action| FA[Function App\nDedicated B1]
FA -->|Telemetry| AI[Application Insights]
FA -->|Log stream| LOGS[az webapp log tail]
style GH fill:#24292e,color:#fff
style GA fill:#2088FF,color:#fff
style FA fill:#ff8c00,color:#fff Steps¶
-
Create the GitHub Actions workflow.
Save as
.github/workflows/deploy-node-dedicated.yml:name: deploy-node-functions on: push: branches: [ main ] jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '20' - run: npm ci - run: npm test --if-present - uses: Azure/functions-action@v1 with: app-name: ${{ secrets.APP_NAME }} package: '.' publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }} -
Store secrets in GitHub.
- Add
APP_NAMEin GitHub Actions secrets (e.g.,func-ndded-04100022). - Add
AZURE_FUNCTIONAPP_PUBLISH_PROFILEfrom Function App publish profile export:
az functionapp deployment list-publishing-profiles \ --name "$APP_NAME" \ --resource-group "$RG" \ --xmlCopy the XML output and paste it as the
AZURE_FUNCTIONAPP_PUBLISH_PROFILEsecret value. - Add
-
Validate release health.
az functionapp log taildoes not existAs of Azure CLI 2.83.0,
az functionapp log tailis not a valid command. On Dedicated plans, useaz webapp log tailinstead.Expected log stream output:
2026-04-09T16:20:11 Connected! 2026-04-09T16:20:19 [Information] Executing 'Functions.helloHttp' (Reason='This function was programmatically called via the host APIs.', Id=a1b2c3d4-e5f6-7890-abcd-ef1234567890) 2026-04-09T16:20:19 [Information] Handled hello for world 2026-04-09T16:20:19 [Information] Executed 'Functions.helloHttp' (Succeeded, Id=a1b2c3d4-e5f6-7890-abcd-ef1234567890, Duration=34ms) -
Verify post-deployment function list.
Expected output (abridged):
Verification¶
The log stream confirms the deployed function starts and handles requests successfully. Verify:
- GitHub Actions workflow completes with a green check
az webapp log tailshows function execution logs (notaz functionapp log tail)az functionapp function listshows all functions with languagenode
See Also¶
- Tutorial Overview & Plan Chooser
- Node.js Language Guide
- Platform: Hosting Plans
- Operations: Deployment
- Recipes Index