Update master_app-nyforvarvslistan-dev.yml #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action | |
# More GitHub Actions for Azure: https://github.com/Azure/actions | |
name: Build and deploy dotnet core project to Azure Function App - app-nyforvarvslistan-dev | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
env: | |
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root | |
DOTNET_VERSION: '6.0.x' # set this to the dotnet version to use | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write #This is required for requesting the JWT | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
repository: mtmse/nyforvarvslistan2 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
fetch-depth: 0 | |
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: 'Resolve Project Dependencies Using Dotnet' | |
shell: bash | |
run: | | |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}' | |
dotnet build --configuration Release --output ./output | |
popd | |
- name: Check if Dewey_SAB.txt is in the output directory | |
run: | | |
if [ ! -f "./output/Dewey_SAB.txt" ]; then | |
echo "Dewey_SAB.txt is missing from the output directory" | |
exit 1 | |
fi | |
- name: List output directory contents | |
run: ls -la ./output | |
- name: Login to Azure | |
uses: azure/login@v1 | |
with: | |
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_1B559D82203043EFACB02504BE6742E3 }} | |
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_7543B6B8019A48A598E4C2845D6819FA }} | |
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_9F4A3BF148DB431483CD073ED6F3F5C1 }} | |
- name: 'Run Azure Functions Action' | |
uses: Azure/functions-action@v1 | |
id: fa | |
with: | |
app-name: 'app-nyforvarvslistan-dev' | |
slot-name: 'Production' | |
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output' | |