AEG-X-004: deploy DbUp migrations with release artifact #11

Merged
kjh2064 merged 5 commits from fix/deploy-db-migrator-migrations into main 2026-08-06 15:21:23 +09:00
Showing only changes of commit 30f4858a34 - Show all commits
+14 -10
View File
@@ -30,6 +30,9 @@ jobs:
run: | run: |
dotnet publish -c Release -o ./publish src/KArtSell.Host dotnet publish -c Release -o ./publish src/KArtSell.Host
dotnet publish -c Release -o ./publish src/KArtSell.DbMigrator dotnet publish -c Release -o ./publish src/KArtSell.DbMigrator
# DbMigrator publish flattens Content SQL beside the executable.
# Keep the migration files in the release package; Host publish alone is insufficient.
test -f ./publish/0032_shadow_run_queued_status_contract.sql
- name: Create deployment package - name: Create deployment package
run: | run: |
@@ -53,16 +56,17 @@ jobs:
echo "✅ File transferred" echo "✅ File transferred"
echo "" echo ""
echo "📋 Next steps on server (run these):" ssh -i /tmp/deploy_key.pem -o StrictHostKeyChecking=no kjh2064@178.104.200.7 \
echo " ssh kjh2064@178.104.200.7" "export KARTSELL_POSTGRES='${{ secrets.KARTSELL_POSTGRES }}'; \
echo " sudo rm -rf /app/kartsell/current" sudo mkdir -p /app/kartsell/current; \
echo " sudo mkdir -p /app/kartsell" sudo unzip -oq /tmp/kartsell-release.zip -d /app/kartsell/current; \
echo " cd /app/kartsell && sudo unzip /tmp/kartsell-release.zip" cd /app/kartsell/current; \
echo " export KARTSELL_POSTGRES='${{ secrets.KARTSELL_POSTGRES }}'" dotnet KArtSell.DbMigrator.dll; \
echo " dotnet KArtSell.DbMigrator.dll" sudo systemctl restart kartsell; \
echo " sudo systemctl restart kartsell" sleep 3; \
echo "" systemctl is-active --quiet kartsell"
echo "✅ Deployment package ready"
echo "✅ Artifact deployed, DbMigrator executed, and kartsell restarted"
# Cleanup # Cleanup
rm /tmp/deploy_key.pem rm /tmp/deploy_key.pem