diff --git a/.gitea/workflows/deploy-prod.yml b/.gitea/workflows/deploy-prod.yml index 14e715c9..1188cdb7 100644 --- a/.gitea/workflows/deploy-prod.yml +++ b/.gitea/workflows/deploy-prod.yml @@ -64,6 +64,36 @@ jobs: --no-restore \ --no-build + - name: Write Production Config + run: | + mkdir -p ./publish + DEPLOY_HOST="${{ secrets.DEPLOY_HOST }}" + DEPLOY_USER="${{ secrets.DEPLOY_USER }}" + + # appsettings.Production.json 생성 + python3 -c ' + import json + import pathlib + + config = { + "ConnectionStrings": { + "DefaultConnection": "Host=127.0.0.1;Database=quantenginedb;Username=quantengine_app;Password=quantengine_app;Search Path=quantengine;" + }, + "Logging": { + "LogLevel": { + "Default": "Information" + } + } + } + + pathlib.Path("./publish/appsettings.Production.json").write_text( + json.dumps(config, ensure_ascii=False, indent=2), + encoding="utf-8" + )' + + test -s ./publish/appsettings.Production.json || { echo "ERROR: appsettings.Production.json is empty"; exit 1; } + echo "✓ Production config created" + - name: Package Artifact run: | ARTIFACT="${{ steps.metadata.outputs.artifact }}"