Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (45 sloc) 1.25 KB
name: Build and Deploy
env:
OUTPUT_PATH: ${{ github.workspace }}/.output
DOTNET_VERSION: "3.1.100"
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@master
- name: Setup Dotnet ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Publish functions
run: dotnet publish --configuration Release --output ${{ env.OUTPUT_PATH }}
- name: Package functions
uses: actions/upload-artifact@v1
with:
name: functions
path: ${{ env.OUTPUT_PATH }}
deploy:
runs-on: ubuntu-latest
needs: [build]
env:
FUNC_APP_NAME: blogimagegenerator
steps:
- name: Download website
uses: actions/download-artifact@v1
with:
name: functions
path: ${{ env.OUTPUT_PATH }}
- name: "Login via Azure CLI"
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: "Run Azure Functions Action"
uses: Azure/functions-action@v1
with:
app-name: ${{ env.FUNC_APP_NAME }}
package: ${{ env.OUTPUT_PATH }}
You can’t perform that action at this time.