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.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,18 +17,24 @@ The site is hosted on GitHub Pages with a custom domain.
17
17
18
18
## Workflow
19
19
20
-
`.github/workflows/deploy.yml` runs on every push:
20
+
`.github/workflows/deploy.yml` runs on every push, on branch delete, and on manual `workflow_dispatch`:
21
21
22
22
1. Installs Bun, runs the test suite, builds the site with `SITE_BASE_URL` set to `/` for `main` or `/preview/<branch>/` for other branches.
23
23
2. Runs the axe-core a11y scan against the built output.
24
24
3. Checks out `gh-pages`, syncs the build output into the right directory, commits, and pushes.
25
-
4. Registers a GitHub Deployment against the `production` or `preview` environment so the URL appears in the PR "Deployments" panel.
25
+
4. Registers a GitHub Deployment against the `production`environment (for main) or a per-branch `preview/<sanitized-branch>` environment, so every branch's URL appears in the PR "Deployments" panel and the repo's Deployments page can be used to navigate per-branch preview state.
26
26
27
-
When a branch is deleted, a cleanup job removes `preview/<sanitized-branch>/` from `gh-pages`.
27
+
Concurrency is keyed on the acted-on branch name, not `github.ref`. A `delete` event against `feat/foo` and a `push` to `main` run in different concurrency groups, so a branch cleanup cannot cancel a production deploy.
28
+
29
+
When a branch is deleted, the `cleanup-preview` job runs and does two things:
30
+
- Removes `preview/<sanitized-branch>/` from `gh-pages`.
31
+
- Marks every deployment in the `preview/<sanitized-branch>` environment as `inactive` so the GitHub UI stops showing them as live.
32
+
33
+
The environment entry itself persists in the Deployments sidebar. Deleting environments requires repo-admin rights that `GITHUB_TOKEN` cannot be granted via `permissions:`; that step would need a PAT-backed secret and has been deferred.
28
34
29
35
## Custom domain
30
36
31
-
`CNAME` at the source repo root contains `labs.flexion.us`. The workflow copies it to `gh-pages` if absent.
37
+
`CNAME` at the source repo root contains `labs.flexion.us`. The build driver (`src/build/entry.tsx`) copies it into `dist/` on production builds only — preview subdirectories must not carry a CNAME.
0 commit comments