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
+8-9Lines changed: 8 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,17 +58,16 @@ nmoraislab.github.io/
58
58
59
59
## Branch workflow
60
60
61
-
> ⚠️ **`main` deploys automatically to the live website. Please do not push directly to it.**
61
+
> ⚠️ **`main`is protected and deploys automatically to the live website. You cannot push to it directly.**
62
62
63
-
`main` is not technically protected, so GitHub will let you push - but doing so updates the live site immediately. All changes should go through a pull request instead:
63
+
`main` is a **protected branch**: direct pushes are blocked, and every change must go through a **pull request that is approved by at least one other person** before it can be merged. This keeps an accidental commit from breaking the live site, and guarantees a second pair of eyes on every change.
64
64
65
65
1. Create a new branch (e.g. `add-new-member`) or switch to the `dev` branch.
66
-
2.**Make sure your branch is up to date with `main`** - on GitHub, open your branch, and if it shows "X commits behind main", click **Sync fork** or **Update branch** to pull in the latest changes.
67
-
3. Make your changes and commit them.
68
-
4. Open a pull request into `main` on GitHub.
69
-
5. Someone reviews and merges - the site updates within ~60 seconds.
70
-
71
-
---
66
+
2.**Make sure your branch is up to date with `main`** - on GitHub, open your branch, and if it shows "X commits behind main", click **Update branch** to pull in the latest changes.
67
+
3. Make your changes and commit them to your branch.
68
+
4. Push the branch and open a **pull request** into `main` on GitHub.
69
+
5.**Ask a colleague to review it.** GitHub will not let you approve your own pull request, so another lab member with write access has to approve it before the merge button unlocks. (Plan for this on time-sensitive changes - you always need someone else to click approve.)
70
+
6. Once approved, **merge** the pull request. The GitHub Actions workflow runs automatically and the live site updates within ~60 seconds.
72
71
73
72
## How it works
74
73
@@ -96,7 +95,7 @@ Then open **[http://localhost:8000](http://localhost:8000)**.
96
95
97
96
Deployment is handled by a **GitHub Actions workflow** at `.github/workflows/deploy.yml`. It runs automatically on every push to `main` (including PR merges) and can also be triggered manually from the **Actions** tab (`workflow_dispatch`). No build step is needed - it uploads the repository as-is and publishes it via `actions/deploy-pages`.
98
97
99
-
**Never push directly to `main`**- see the branch workflow above.
98
+
**`main` is protected - you can't push to it directly.**Every change reaches the live site by merging an approved pull request (see the branch workflow above).
100
99
101
100
**One-time repo setup (already done for this repo, kept here for reference):**
102
101
1. Settings → Pages → **Source** → set to **GitHub Actions** (not "Deploy from a branch").
0 commit comments