Skip to content

Commit

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

env:
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 }}

jobs:
build-and-deploy:
strategy:
matrix:
service: ${{ fromJson(env.AZURE_WEBAPP_NAMES) }}
service:
names: [${{ secrets.AZURE_WEBAPP_NAMES }}]
publish_profiles: [${{ secrets.PUBLISH_PROFILE }}, ${{ secrets.APP_PUBLISH_PROFILE }}]
runs-on: ubuntu-latest

steps:
Expand All @@ -34,13 +34,13 @@ jobs:
run: |
mkdir -p deployment_packages
cp -r $AZURE_WEBAPP_SHARED_LIBS_PATH/* 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 ..
cp -r ${{ matrix.service.names }}/* deployment_packages/
cd deployment_packages && zip -r ../${{ matrix.service.names }}.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(env.AZURE_WEBAPP_PUBLISH_PROFILES)[matrix.service]}}
package: ${{ github.workspace }}/${{matrix.service}}.zip
app-name: ${{ matrix.service.names }}
publish-profile: ${{ matrix.service.publish_profiles }}
package: ${{ github.workspace }}/${{ matrix.service.names }}.zip

0 comments on commit 2bdb55e

Please sign in to comment.