A short tutorial on how to deploy an Azure function using GitHub action.

As we know, GitHub Actions help us automate tasks, for example, executing an integration/deployment pipeline as we create a release, or running integration test scripts after pull request event, or maybe just simply an acknowledgment to a user who has created an issue against your repository.

Here, we will create a simple Github action to deploy an HTTP Trigger Azure function to Azure Function App.

STEP 0: Prerequisite

  1. Azure Cloud Subscription
  2. Github Account and repo (you can use my sample repo as an example).
  3. Azure Functions Core Tools (for creating an HTTP Trigger Azure function)
  4. Node Js (using Typescript as language)
  5. Your Favourite Code Source Editor (optional)
  6. Azure CLI (optional)

STEP 1: Create a function app in Azure

Step 1, is to create a function app in Azure. I am not going into the details of how to create the function app. You can either use an easy self-guided** Azure portal** or Azure CLI to create a function app.

Once we have created a function app in Azure, one key thing we have to do is download its publish profile, as we will need it to deploy the function to the function app from GitHub.

One key thing to do here is add the below configuration parameter to configuration settings of the function app:

_WEBSITE_WEBDEPLOY_USE_SCM__ : __TRUE_

#github #github-actions

Lights — Camera — {Github}Action: Deploy a Azure function using Github actions
2.05 GEEK