You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/deployment/github-actions-server.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,12 +27,14 @@ Configure these repository secrets before enabling the workflow:
27
27
|`DEPLOY_PATH`|`/opt/clipSync-server-src`| Live server directory that receives `bin/`, `configs/`, and preserved `data/`|
28
28
|`DEPLOY_SERVICE_NAME`|`clipsync.service`| systemd service restarted during deploy and rollback |
29
29
|`DEPLOY_KNOWN_HOSTS`| output of `ssh-keyscan -H 8.141.100.238`| Host key entry used for strict SSH host verification |
30
+
|`DEPLOY_JWT_SECRET`| a long random secret | Injected into the deployed server config during deployment; do not store the live JWT secret in git |
30
31
31
32
Notes:
32
33
33
34
-`DEPLOY_SSH_KEY` must match the public key installed for `DEPLOY_USER` on the server.
34
35
-`DEPLOY_KNOWN_HOSTS` is required because the workflow uses `StrictHostKeyChecking=yes`.
35
36
- Keep `DEPLOY_PATH` and `DEPLOY_SERVICE_NAME` aligned with the actual server layout and systemd unit.
37
+
-`DEPLOY_JWT_SECRET` should be treated as the real production JWT signing key. The repository config now keeps only the placeholder value.
36
38
- Optional: `DEPLOY_PUBLIC_HEALTH_URL` can override the final GitHub Actions health-check URL when the public endpoint differs from `http://<DEPLOY_HOST>:8081/api/v1/health`.
37
39
38
40
## Server Requirements
@@ -60,7 +62,7 @@ The server process defaults to the relative path `configs/config.yaml`. That mea
60
62
61
63
## First-Time Setup
62
64
63
-
1. Confirm the repository version of `clipSync-server/configs/config.yaml`is safe for the deployment environment.
65
+
1. Confirm the repository version of `clipSync-server/configs/config.yaml`keeps the placeholder JWT secret and any other non-secret defaults you want deployed.
64
66
2. Create the required GitHub repository secrets listed above.
65
67
3. Install the deploy public key for `DEPLOY_USER` on the server.
66
68
4. Capture the server host key for `DEPLOY_KNOWN_HOSTS`.
The remote deployment script is intentionally narrow and opinionated:
100
102
101
103
-`data/` is preserved. The script creates `DEPLOY_PATH/data` if needed and never deletes or replaces it.
102
-
-`configs/config.yaml` is overwritten from the repository on every deploy.
104
+
-`configs/config.yaml` is overwritten from the repository on every deploy, then the script replaces the placeholder JWT secret with `DEPLOY_JWT_SECRET` on the server.
103
105
- The live binary path is `DEPLOY_PATH/bin/clipsync-server-linux`.
104
106
- The binary backup path is `DEPLOY_PATH/bin/clipsync-server-linux.prev`.
105
107
- The config backup path is `DEPLOY_PATH/configs/config.yaml.prev`.
@@ -168,6 +170,7 @@ What to verify:
168
170
169
171
- The service name in `DEPLOY_SERVICE_NAME` is correct.
170
172
- The deployed config in `/opt/clipSync-server-src/configs/config.yaml` contains production-safe values.
173
+
-`DEPLOY_JWT_SECRET` exists in GitHub Secrets and the deployed config no longer contains the placeholder value.
171
174
- The service is actually starting the binary at `/opt/clipSync-server-src/bin/clipsync-server-linux`.
172
175
- Port `8081` is listening and reachable from outside the host if the final GitHub Actions health check is using the default URL.
173
176
- If `DEPLOY_PUBLIC_HEALTH_URL` is configured, verify that public endpoint and any proxy/load-balancer routing in front of it.
@@ -178,7 +181,7 @@ What to verify:
178
181
Before treating this flow as ready:
179
182
180
183
- Confirm the secrets in GitHub match the real server.
181
-
- Confirm `clipSync-server/configs/config.yaml` is intended to overwrite production on every push to `main`.
184
+
- Confirm `clipSync-server/configs/config.yaml` is intended to overwrite production on every push to `main`, aside from the JWT secret placeholder that gets replaced at deploy time.
182
185
- Confirm `DEPLOY_PUBLIC_HEALTH_URL` is set if the API port is not publicly reachable from GitHub-hosted runners.
183
186
- Confirm the systemd service still uses the same binary path and health endpoint.
184
187
- Confirm operators understand that `data/` is preserved but config is not, and that rollback does not restore SQLite database state.
0 commit comments