Skip to content

Commit

Permalink
feat: update gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
felipementel committed Oct 14, 2024
1 parent 18030df commit 5de49ed
Showing 1 changed file with 55 additions and 46 deletions.
101 changes: 55 additions & 46 deletions .github/workflows/AzureFunction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,49 +59,6 @@ jobs:
run: |
dotnet build ${{ env.app_full_path }} --configuration Release --output ${{ env.app_path }}/output --no-incremental
# - name: 'Build'
# shell: bash
# run: |
# pushd ${{ env.app_path }}
# dotnet build --configuration Release --output ./output
# popd

- name: Zip files
run: |
cd ${{ env.app_path }}/output
zip -r ${{ env.app_name }}.zip .
- name: 'Publish Artifact for Azure Functions'
uses: actions/upload-artifact@v4
with:
name: function-artifact
path: ${{ env.app_path }}/output
retention-days: 5
overwrite: true
compression-level: 9

deploy:
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
needs: build

steps:
- name: Log in to Azure
uses: azure/[email protected]
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Download Artifact for Azure Functions
uses: actions/download-artifact@v4
with:
name: function-artifact
path: ${{ env.app_path }}/output

- name: Verificando o download do artefato
run: |
ls
ls -la ${{ env.app_path }}/output
- name: 'Run Azure Functions Action'
uses: Azure/[email protected]
id: deploy-function-app
Expand All @@ -111,6 +68,58 @@ jobs:
publish-profile: ${{ secrets.FUNCTION_PUBLISH_PROFILE }}
package: ${{ env.app_path }}/output

- name: Log out from Azure
run: |
az logout
# - name: 'Build'
# shell: bash
# run: |
# pushd ${{ env.app_path }}
# dotnet build --configuration Release --output ./output
# popd
###
# - name: Zip files
# run: |
# cd ${{ env.app_path }}/output
# zip -r ${{ env.app_name }}.zip .

# - name: 'Publish Artifact for Azure Functions'
# uses: actions/upload-artifact@v4
# with:
# name: function-artifact
# path: ${{ env.app_path }}/output
# retention-days: 5
# overwrite: true
# compression-level: 9

# deploy:
# if: ${{ github.event_name != 'pull_request' }}
# runs-on: ubuntu-latest
# needs: build

# steps:
# - name: Log in to Azure
# uses: azure/[email protected]
# with:
# creds: ${{ secrets.AZURE_CREDENTIALS }}

# - name: Download Artifact for Azure Functions
# uses: actions/download-artifact@v4
# with:
# name: function-artifact
# path: ${{ env.app_path }}/output

# - name: Verificando o download do artefato
# run: |
# ls
# ls -la ${{ env.app_path }}/output

# - name: 'Run Azure Functions Action'
# uses: Azure/[email protected]
# id: deploy-function-app
# with:
# app-name: ${{ env.app_name }}
# slot-name: 'production'
# publish-profile: ${{ secrets.FUNCTION_PUBLISH_PROFILE }}
# package: ${{ env.app_path }}/output

# - name: Log out from Azure
# run: |
# az logout

0 comments on commit 5de49ed

Please sign in to comment.