ci: stop shipping unit file in deploy — unit is host config, not CI artifact
This commit is contained in:
@@ -9,7 +9,6 @@ on:
|
|||||||
- 'DeepDrftContent/**'
|
- 'DeepDrftContent/**'
|
||||||
- 'DeepDrftModels/**'
|
- 'DeepDrftModels/**'
|
||||||
- '.gitea/workflows/deploy-api.yml'
|
- '.gitea/workflows/deploy-api.yml'
|
||||||
- 'deploy/systemd/deepdrftapi.service'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -110,7 +109,6 @@ jobs:
|
|||||||
rsync -e "ssh -i ~/.ssh/deepdrft_ed25519 -o StrictHostKeyChecking=yes" \
|
rsync -e "ssh -i ~/.ssh/deepdrft_ed25519 -o StrictHostKeyChecking=yes" \
|
||||||
staging/deepdrft-api.tar.gz \
|
staging/deepdrft-api.tar.gz \
|
||||||
staging/deepdrft-migrations-bundle \
|
staging/deepdrft-migrations-bundle \
|
||||||
deploy/systemd/deepdrftapi.service \
|
|
||||||
deepdrft@$DEPLOY_HOST:
|
deepdrft@$DEPLOY_HOST:
|
||||||
|
|
||||||
- name: Trigger deploy on host
|
- name: Trigger deploy on host
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
# Expects in ${APP_HOME}/staging/:
|
# Expects in ${APP_HOME}/staging/:
|
||||||
# deepdrft-api.tar.gz -- published self-contained linux-x64 binary tree
|
# deepdrft-api.tar.gz -- published self-contained linux-x64 binary tree
|
||||||
# deepdrft-migrations-bundle -- self-contained EF bundle (pre-built in CI)
|
# deepdrft-migrations-bundle -- self-contained EF bundle (pre-built in CI)
|
||||||
# deepdrftapi.service -- systemd unit file (optional)
|
|
||||||
#
|
#
|
||||||
# Migrations are applied BEFORE the service restarts via the EF bundle binary.
|
# Migrations are applied BEFORE the service restarts via the EF bundle binary.
|
||||||
# The bundle covers DeepDrftContext (track metadata DB) only.
|
# The bundle covers DeepDrftContext (track metadata DB) only.
|
||||||
@@ -94,15 +93,6 @@ if [[ -d "${APPROOT}/environment" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ── Install systemd unit file (if present in staging) ─────────────────────
|
|
||||||
if [[ -f "${STAGING}/deepdrftapi.service" ]]; then
|
|
||||||
mkdir -p "${APP_HOME}/.config/systemd/user"
|
|
||||||
cp "${STAGING}/deepdrftapi.service" "${APP_HOME}/.config/systemd/user/deepdrftapi.service"
|
|
||||||
rm -f "${STAGING}/deepdrftapi.service"
|
|
||||||
systemctl --user daemon-reload
|
|
||||||
echo "[deploy-api] systemd unit file installed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ── Enable and restart service ─────────────────────────────────────────────
|
# ── Enable and restart service ─────────────────────────────────────────────
|
||||||
systemctl --user enable deepdrftapi.service
|
systemctl --user enable deepdrftapi.service
|
||||||
systemctl --user restart deepdrftapi.service
|
systemctl --user restart deepdrftapi.service
|
||||||
|
|||||||
Reference in New Issue
Block a user