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: README.md
+89-3Lines changed: 89 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,15 +230,101 @@ Open a pull request on one of the repos where Layne is installed. Within a few s
230
230
231
231
### Automated Deployment
232
232
233
-
Layne ships with a GitHub Actions workflow (`.github/workflows/deploy.yml`) that runs tests and then deploys to your EC2 instance on every push to `main`. It can also be triggered manually from the Actions tab via `workflow_dispatch`.
233
+
Here is the GitHub Actions workflow we use internally to deploy Layne to an EC2 instance on every push to `main`. Copy it into your own repository's `.github/workflows/deploy.yml` and configure the secrets below.
234
234
235
-
**What the workflow does:**
235
+
The workflow:
236
236
237
237
1. Runs the full test suite — the deploy step is skipped if tests fail
238
238
2. Rsyncs the repository to `/home/ubuntu/layne/layne/` on the server, preserving `data/` (certbot certificates) and never touching `.env`
239
239
3. Writes a fresh `.env` file from GitHub secrets
240
240
4. Runs `docker compose up --build --no-deps -d server worker` — rebuilds and restarts only the server and worker, leaving Redis (and the BullMQ queue) untouched
docker compose up --build --no-deps -d server worker &&
325
+
docker compose exec nginx nginx -s reload'
326
+
```
327
+
242
328
**Required GitHub secrets:**
243
329
244
330
Go to your repository → **Settings → Secrets and variables → Actions** and add:
@@ -264,7 +350,7 @@ Go to your repository → **Settings → Secrets and variables → Actions** and
264
350
265
351
> **Note:** GitHub reserves the `GITHUB_` prefix for its own built-in variables, so the three app secrets use a `GH_` prefix here. The workflow maps them to the correct `GITHUB_`-prefixed names when writing `.env`.
266
352
267
-
The workflow uses a GitHub [**environment**](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment) named `production`. You can configure deployment protection rules on that environment (e.g. require a manual approval before deploying to production).
353
+
The workflow uses a GitHub [**environment**](https://docs.github.com/en/actions/deployment/targeting-different-deployment-environments) named `production`. You can configure deployment protection rules on that environment (e.g. require a manual approval before deploying to production).
Copy file name to clipboardExpand all lines: docs/configuration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Configuration
2
2
3
-
Scanner behaviour, labels, and notifications are all configured in `config/repos.json`. Layne reads this file once at worker startup — **restart the worker to pick up changes** (the automated deploy pipeline does this automatically).
3
+
Scanner behaviour, labels, and notifications are all configured in `config/repos.json`. Layne reads this file once at worker startup — **restart the worker to pick up changes**.
0 commit comments