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
# Alternative: serve with uv (no Python installation required)
97
-
uv run --no-project python -m http.server 8080 --directory site
98
122
```
99
123
100
-
To iterate on templates or styles, re-run `node build.js` after each change and refresh the browser. There is no watch mode, but Node's built-in `--watch` flag works:
124
+
## Developing on a fork (sharing a live preview)
125
+
126
+
To share a live preview of your website changes with others, you can deploy from
127
+
a **`*-webtest`** branch on your GitHub fork. The CI workflow detects this naming
128
+
convention and **skips the slow Lean build**, downloading data from the live
129
+
production site instead.
130
+
131
+
### One-time fork setup
132
+
133
+
1.**Fork** the repository on GitHub.
134
+
135
+
2.**Enable GitHub Pages:**
136
+
- Go to your fork's **Settings → Pages**
137
+
- Set **Source** to **GitHub Actions**
138
+
139
+
3.**Allow webtest branches to deploy:**
140
+
- Go to **Settings → Environments → `github-pages`**
141
+
- Under **Deployment branches and tags**, click **Add deployment branch or tag rule**
142
+
- Add the pattern **`*-webtest`**
143
+
- Save
144
+
145
+
### Development workflow
101
146
102
147
```bash
103
-
node --watch build.js
104
-
```
148
+
# Create a webtest branch from main
149
+
git checkout -b my-feature-webtest origin/main
105
150
106
-
## Using a placeholder dataset for UI development
107
-
108
-
If you don't have the formal-conjectures repo built locally, you can populate `data/conjectures.json` with a small synthetic dataset for UI testing. The expected JSON format is an array of objects:
Your site will be live at `https://<username>.github.io/formal-conjectures/`
159
+
once the Action completes (typically ~2 minutes for a website-only build).
160
+
161
+
> **Note:** The naming convention `*-webtest` is what triggers the fast
162
+
> website-only build. Branches without this suffix run the full Lean build.
163
+
164
+
> **Note:** GitHub Pages serves one deployment at a time per repo. Deploying
165
+
> from a webtest branch replaces what was deployed from `main`. This is fine
166
+
> for a fork used for previewing.
167
+
168
+
126
169
127
170
## CI / deployment
128
171
129
-
The GitHub Actions workflow in `.github/workflows/deploy.yml` triggers on any push to `main` that touches `data/conjectures.json`, `src/`, `build.js`, or `package.json`. It runs `node build.js` and deploys the `site/` directory to GitHub Pages using the standard `actions/upload-pages-artifact` + `actions/deploy-pages` actions.
172
+
The GitHub Actions workflow in `.github/workflows/build-and-docs.yml` triggers on pushes to `main` and `*-webtest` branches, as well as on pull requests.
173
+
174
+
**Build modes:**
175
+
176
+
| Condition | Build mode | What happens |
177
+
|-----------|-----------|--------------|
178
+
| Push to `main` on upstream | Full build | Lean compilation + docs + website |
179
+
| Push to `*-webtest` branch | Website-only | Downloads live data, builds website only (~2 min) |
180
+
| Manual `workflow_dispatch` with `website_only=true`| Website-only | Same as above |
181
+
| Pull request | Full build | Lean compilation + docs + website (no deploy) |
182
+
183
+
**Deployment** happens on pushes to `main`, and on `*-webtest` branches when on a fork.
130
184
131
-
To enable GitHub Pages for this repo, go to **Settings → Pages** and set the source to **GitHub Actions**.
185
+
For GitHub Pages setup (including the environment rule needed for `*-webtest` branches), see [One-time fork setup](#one-time-fork-setup) above.
0 commit comments