06 - CI/CD (Premium)¶
Automate build and deployment of your Premium (EP1) PowerShell app with GitHub Actions.
Workflow¶
name: deploy-powershell-functions
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bundle PowerShell modules
shell: pwsh
run: |
Save-Module -Name Az.Accounts -Path ./Modules
- name: Azure login
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Deploy to Azure Functions
uses: Azure/functions-action@v1
with:
app-name: func-ps-demo
package: .
Verification¶
Push to main and confirm the workflow completes green in the Actions tab, then curl the deployed endpoint.
Next Steps¶
Extend beyond HTTP with additional trigger types.
See Also¶
- Tutorial Overview & Plan Chooser
- PowerShell Language Guide
- Platform: Hosting Plans
- Operations: Deployment
- Recipes Index