Skip to content

Commit cb17376

Browse files
author
CIS Guru
committed
CI: update deploy workflow to SP-backed az webapp deploy; remove Kudu steps
1 parent f9316e9 commit cb17376

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ jobs:
5555
--src-path "${{ github.workspace }}/publish.zip" \
5656
--type zip
5757
58-
- name: Save publish profile to file
59-
run: |
60-
echo "${{ secrets.AZURE_PUBLISH_PROFILE }}" > /tmp/publish_profile.xml
61-
6258
- name: Extract DB settings and export to GITHUB_ENV
6359
run: |
6460
DB_FILE=$(jq -r '.ApplicationSettings.DatabaseFileName // "app_v0.0.0.db"' Aquiis.SimpleStart/appsettings.json)
@@ -71,16 +67,11 @@ jobs:
7167
echo "SCHEMA_VERSION=$SCHEMA_VERSION" >> "$GITHUB_ENV"
7268
echo "DB_PATH=/home/data/$DB_FILE" >> "$GITHUB_ENV"
7369
shell: bash
74-
75-
- name: Create /home/data on App Service
76-
run: |
77-
chmod +x ./scripts/kudu-create-data-dir.sh
78-
./scripts/kudu-create-data-dir.sh /tmp/publish_profile.xml ${{ secrets.AZURE_WEBAPP_NAME }}
79-
8070
- name: Backup existing DB (if any)
71+
if: env.DB_PATH != ''
8172
run: |
82-
chmod +x ./scripts/kudu-backup-db.sh
83-
./scripts/kudu-backup-db.sh /tmp/publish_profile.xml ${{ secrets.AZURE_WEBAPP_NAME }} "$DB_PATH" || true
73+
echo "Skipping Kudu-based DB backup because publish-profile/Kudu is not used when deploy via service principal."
74+
echo "Ensure app startup handles DB migrations/backups or run an alternative remote command if necessary."
8475
8576
- name: Azure Login (for App Settings)
8677
uses: azure/login@v1

0 commit comments

Comments
 (0)