Workflow file overview
A workflow is defined by a YAML (.yml) file in the /.github/workflows/ path in your repository. This definition contains the various steps and parameters that make up the workflow.
The file has three sections:
Use the Deployment Center
You can quickly get started with GitHub Actions by using the App Service Deployment Center. This will automatically generate a workflow file based on your application stack and commit it to your GitHub repository in the correct directory.
- Navigate to your webapp in the Azure portal
- On the left side, click Deployment Center
- Under Continuous Deployment (CI / CD), select GitHub
- Next, select GitHub Actions
- Use the dropdowns to select your GitHub repository, branch, and application stack
- If the selected branch is protected, you can still continue to add the workflow file. Be sure to review your branch protections before continuing.
6. On the final screen, you can review your selections and preview the workflow file that will be committed to the repository. If the selections are correct, click Finish
This will commit the workflow file to the repository. The workflow to build and deploy your app will start immediately.
The following examples show how to set up the environment for the different supported languages:
.NET
YAML
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.3.x'
ASP.NET
YAML
uses: nuget/setup-nuget@v1
with:
nuget-version: ${{ env.NUGET_VERSION}}
- app-name: (Required) Name of the App Service app
- publish-profile: (Optional) Publish profile file contents with Web Deploy secrets
- package: (Optional) Path to package or folder. The path can include *.zip, *.war, *.jar, or a folder to deploy.
- slot-name: (Optional) Enter an existing slot other than the production slot
0 Comments