fix: Add appsettings.Production.json generation to deploy-prod.yml
Deploy to Production / Build Release (push) Failing after 34s
Deploy to Production / Pre-Deployment Verification (push) Has been skipped
Deploy to Production / Deploy to Production (push) Has been skipped
Deploy to Production / Health Check & Verification (push) Has been skipped
Deploy to Production / Deployment Report (push) Failing after 1s
Deploy to Production / Build Release (push) Failing after 34s
Deploy to Production / Pre-Deployment Verification (push) Has been skipped
Deploy to Production / Deploy to Production (push) Has been skipped
Deploy to Production / Health Check & Verification (push) Has been skipped
Deploy to Production / Deployment Report (push) Failing after 1s
Missing configuration file step caused DB authentication failure. Added Python config generator (taxbaik pattern) to create appsettings.Production.json with DB connection string before packaging. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -64,6 +64,36 @@ jobs:
|
|||||||
--no-restore \
|
--no-restore \
|
||||||
--no-build
|
--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
|
- name: Package Artifact
|
||||||
run: |
|
run: |
|
||||||
ARTIFACT="${{ steps.metadata.outputs.artifact }}"
|
ARTIFACT="${{ steps.metadata.outputs.artifact }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user