AEG-X-004: deploy DbUp migrations with release artifact
ci / backend (push) Failing after 1s
ci / static (push) Failing after 8s
ci / backend (pull_request) Failing after 2s
ci / static (pull_request) Failing after 11s
Build & Test with Secrets / build (pull_request) Failing after 1s
ci / publish (push) Has been cancelled
ci / frontend (push) Has been cancelled
ci / frontend (pull_request) Has been cancelled
ci / publish (pull_request) Has been cancelled
Build & Test with Secrets / security-scan (pull_request) Failing after 8s
Build & Test with Secrets / frontend (pull_request) Successful in 4m42s
Build & Test with Secrets / notification (pull_request) Failing after 1s
ci / backend (push) Failing after 1s
ci / static (push) Failing after 8s
ci / backend (pull_request) Failing after 2s
ci / static (pull_request) Failing after 11s
Build & Test with Secrets / build (pull_request) Failing after 1s
ci / publish (push) Has been cancelled
ci / frontend (push) Has been cancelled
ci / frontend (pull_request) Has been cancelled
ci / publish (pull_request) Has been cancelled
Build & Test with Secrets / security-scan (pull_request) Failing after 8s
Build & Test with Secrets / frontend (pull_request) Successful in 4m42s
Build & Test with Secrets / notification (pull_request) Failing after 1s
This commit is contained in:
+14
-10
@@ -30,6 +30,9 @@ jobs:
|
||||
run: |
|
||||
dotnet publish -c Release -o ./publish src/KArtSell.Host
|
||||
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
|
||||
run: |
|
||||
@@ -53,16 +56,17 @@ jobs:
|
||||
|
||||
echo "✅ File transferred"
|
||||
echo ""
|
||||
echo "📋 Next steps on server (run these):"
|
||||
echo " ssh kjh2064@178.104.200.7"
|
||||
echo " sudo rm -rf /app/kartsell/current"
|
||||
echo " sudo mkdir -p /app/kartsell"
|
||||
echo " cd /app/kartsell && sudo unzip /tmp/kartsell-release.zip"
|
||||
echo " export KARTSELL_POSTGRES='${{ secrets.KARTSELL_POSTGRES }}'"
|
||||
echo " dotnet KArtSell.DbMigrator.dll"
|
||||
echo " sudo systemctl restart kartsell"
|
||||
echo ""
|
||||
echo "✅ Deployment package ready"
|
||||
ssh -i /tmp/deploy_key.pem -o StrictHostKeyChecking=no kjh2064@178.104.200.7 \
|
||||
"export KARTSELL_POSTGRES='${{ secrets.KARTSELL_POSTGRES }}'; \
|
||||
sudo mkdir -p /app/kartsell/current; \
|
||||
sudo unzip -oq /tmp/kartsell-release.zip -d /app/kartsell/current; \
|
||||
cd /app/kartsell/current; \
|
||||
dotnet KArtSell.DbMigrator.dll; \
|
||||
sudo systemctl restart kartsell; \
|
||||
sleep 3; \
|
||||
systemctl is-active --quiet kartsell"
|
||||
|
||||
echo "✅ Artifact deployed, DbMigrator executed, and kartsell restarted"
|
||||
|
||||
# Cleanup
|
||||
rm /tmp/deploy_key.pem
|
||||
|
||||
Reference in New Issue
Block a user