Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jibin362 committed Jun 11, 2024
1 parent ca068be commit 0658e3c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ on:
- main

env:
AZURE_WEBAPP_NAMES: ["test-service", "app-service"]
AZURE_WEBAPP_NAMES: ${{ secrets.AZURE_WEBAPP_NAMES }}
AZURE_WEBAPP_SHARED_LIBS_PATH: "libs"
AZURE_WEBAPP_SERVICE_PATHS: ["test-service", "app-service"]
AZURE_WEBAPP_PUBLISH_PROFILES:
["${{ secrets.PUBLISH_PROFILE }}", "${{ secrets.APP_PUBLISH_PROFILE }}"]
AZURE_WEBAPP_SERVICE_PATHS: "test-service,app-service"
AZURE_WEBAPP_PUBLISH_PROFILES: ${{ secrets.PUBLISH_PROFILE }},${{ secrets.APP_PUBLISH_PROFILE }}

jobs:
build-and-deploy:
strategy:
matrix:
service: ${{ fromJson(secrets.AZURE_WEBAPP_NAMES) }}
service: ${{ fromJson(env.AZURE_WEBAPP_NAMES) }}
runs-on: ubuntu-latest

steps:
Expand All @@ -35,13 +34,13 @@ jobs:
run: |
mkdir -p deployment_packages
cp -r $AZURE_WEBAPP_SHARED_LIBS_PATH/* deployment_packages/
cp -r ${{fromJson(secrets.AZURE_WEBAPP_SERVICE_PATHS)[matrix.service]}}/* deployment_packages/
cp -r ${{fromJson(env.AZURE_WEBAPP_SERVICE_PATHS)[matrix.service]}}/* deployment_packages/
cd deployment_packages && zip -r ../${{matrix.service}}.zip . -x '*.git*' && cd ..
working-directory: ${{ github.workspace }}

- name: Deploy to Azure
uses: azure/webapps-deploy@v2
with:
app-name: ${{matrix.service}}
publish-profile: ${{fromJson(secrets.AZURE_WEBAPP_PUBLISH_PROFILES)[matrix.service]}}
publish-profile: ${{fromJson(env.AZURE_WEBAPP_PUBLISH_PROFILES)[matrix.service]}}
package: ${{ github.workspace }}/${{matrix.service}}.zip

0 comments on commit 0658e3c

Please sign in to comment.