Skip to content

Commit

Permalink
change github actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyang-li committed Mar 25, 2024
1 parent b912c14 commit 5179306
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/deploy_resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,39 +145,23 @@ jobs:
name: function-app
path: function-app

- name: Run Azure PowerShell script
uses: azure/powershell@v1
id: getPublishProfile
with:
inlineScript: |
$publish_profile_winapp=Get-AzWebAppPublishingProfile -ResourceGroupName stf-${{ matrix.location }} -Name "stf-${{ matrix.location }}-winapp"
$publish_profile_linuxapp=Get-AzWebAppPublishingProfile -ResourceGroupName stf-${{ matrix.location }} -Name "stf-${{ matrix.location }}-linuxapp"
$publish_profile_functionapp=Get-AzWebAppPublishingProfile -ResourceGroupName stf-${{ matrix.location }} -Name "stf-${{ matrix.location }}-functionapp"
echo "publish_profile_winapp=$($publish_profile_winapp)" >> $GITHUB_OUTPUT
echo "publish_profile_linuxapp=$($publish_profile_linuxapp)" >> $GITHUB_OUTPUT
echo "publish_profile_functionapp=$( $publish_profile_functionapp)" >> $GITHUB_OUTPUT
azPSVersion: "latest"

- name: Deploy to Azure Windows Web App
id: deploy-to-windows-webapp
uses: azure/webapps-deploy@v2
uses: azure/webapps-deploy@v3
with:
app-name: stf-${{ matrix.location }}-winapp
publish-profile: ${{ steps.getPublishProfile.outputs.publish_profile_winapp }}
package: api-app

- name: Deploy to Azure Linux Web App
id: deploy-to-linux-webapp
uses: azure/webapps-deploy@v2
uses: azure/webapps-deploy@v3
with:
app-name: stf-${{ matrix.location }}-linuxapp
publish-profile: ${{ steps.getPublishProfile.outputs.publish_profile_linuxapp }}
package: api-app

- name: Deploy to Azure Functions App
id: deploy-to-functionapp
uses: Azure/functions-action@v1
with:
app-name: stf-${{ matrix.location }}-functionapp
publish-profile: ${{ steps.getPublishProfile.outputs.publish_profile_functionapp }}
package: function-app

0 comments on commit 5179306

Please sign in to comment.