fix: revert deploy paths to root output directory
This commit is contained in:
@@ -46,24 +46,24 @@ jobs:
|
|||||||
TELEGRAM_CHAT_ID="$TELEGRAM_CHAT_ID" \
|
TELEGRAM_CHAT_ID="$TELEGRAM_CHAT_ID" \
|
||||||
python3 -c '
|
python3 -c '
|
||||||
import json, os, pathlib
|
import json, os, pathlib
|
||||||
pathlib.Path("./publish/web/appsettings.Production.json").write_text(
|
pathlib.Path("./publish/appsettings.Production.json").write_text(
|
||||||
json.dumps({
|
json.dumps({
|
||||||
"Jwt": {"SecretKey": os.environ["JWT_SECRET_KEY"]},
|
"Jwt": {"SecretKey": os.environ["JWT_SECRET_KEY"]},
|
||||||
"Telegram": {"BotToken": os.environ["TELEGRAM_BOT_TOKEN"], "ChatId": os.environ["TELEGRAM_CHAT_ID"]}
|
"Telegram": {"BotToken": os.environ["TELEGRAM_BOT_TOKEN"], "ChatId": os.environ["TELEGRAM_CHAT_ID"]}
|
||||||
}, ensure_ascii=False, indent=2),
|
}, ensure_ascii=False, indent=2),
|
||||||
encoding="utf-8"
|
encoding="utf-8"
|
||||||
)'
|
)'
|
||||||
test -s ./publish/web/appsettings.Production.json || { echo "appsettings.Production.json is empty" >&2; exit 1; }
|
test -s ./publish/appsettings.Production.json || { echo "appsettings.Production.json is empty" >&2; exit 1; }
|
||||||
|
|
||||||
- name: Copy migrations
|
- name: Copy migrations
|
||||||
run: cp -r db/migrations ./publish/web/migrations || true
|
run: cp -r db/migrations ./publish/migrations || true
|
||||||
|
|
||||||
- name: Generate build info
|
- name: Generate build info
|
||||||
run: |
|
run: |
|
||||||
COMMIT_HASH=$(git rev-parse --short HEAD)
|
COMMIT_HASH=$(git rev-parse --short HEAD)
|
||||||
BUILD_TIME=$(date -u +'%Y-%m-%d %H:%M:%S UTC')
|
BUILD_TIME=$(date -u +'%Y-%m-%d %H:%M:%S UTC')
|
||||||
mkdir -p ./publish/web/wwwroot
|
mkdir -p ./publish/wwwroot
|
||||||
printf 'Version: %s\nBuilt: %s\n' "$COMMIT_HASH" "$BUILD_TIME" > ./publish/web/wwwroot/version.txt
|
printf 'Version: %s\nBuilt: %s\n' "$COMMIT_HASH" "$BUILD_TIME" > ./publish/wwwroot/version.txt
|
||||||
echo "✓ Build: $COMMIT_HASH @ $BUILD_TIME"
|
echo "✓ Build: $COMMIT_HASH @ $BUILD_TIME"
|
||||||
|
|
||||||
- name: Setup SSH
|
- name: Setup SSH
|
||||||
@@ -120,11 +120,11 @@ jobs:
|
|||||||
rm -f "/tmp/taxbaik_\${TIMESTAMP}.tgz"
|
rm -f "/tmp/taxbaik_\${TIMESTAMP}.tgz"
|
||||||
|
|
||||||
echo "--- [2/5] 운영 설정 검증 ---"
|
echo "--- [2/5] 운영 설정 검증 ---"
|
||||||
test -s "\$DEPLOY_DIR/web/appsettings.Production.json" \
|
test -s "\$DEPLOY_DIR/appsettings.Production.json" \
|
||||||
|| { echo "FATAL: appsettings.Production.json 없음" >&2; exit 1; }
|
|| { echo "FATAL: appsettings.Production.json 없음" >&2; exit 1; }
|
||||||
|
|
||||||
echo "--- [3/5] 심볼릭 링크 전환 ---"
|
echo "--- [3/5] 심볼릭 링크 전환 ---"
|
||||||
ln -sfn "\$DEPLOY_DIR/web" "\$DEPLOY_HOME/taxbaik_active"
|
ln -sfn "\$DEPLOY_DIR" "\$DEPLOY_HOME/taxbaik_active"
|
||||||
|
|
||||||
echo "--- [4/5] 서비스 재시작 ---"
|
echo "--- [4/5] 서비스 재시작 ---"
|
||||||
sudo /usr/bin/systemctl restart taxbaik
|
sudo /usr/bin/systemctl restart taxbaik
|
||||||
|
|||||||
Reference in New Issue
Block a user