Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Dependencies update themselves. Each week Dependabot opens, against master
# Dependencies update themselves. Each week Dependabot opens, against main
# and with releases at least 14 days old, one grouped pull request for the
# minor and patch updates of each ecosystem, and one per major update, so a
# major that breaks the build never holds back the others. dependabot-merge.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: CI

on:
pull_request:
branches: [develop, master]
branches: [develop, main]
# node-lts.yml runs the same checks on a newer Node before switching to it.
workflow_call:
inputs:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/dependabot-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
pr=$(gh pr list -R "$REPO" --head "$HEAD_BRANCH" --state open \
--json number,author,baseRefName,headRefOid \
--jq ".[] | select(.author.login == \"app/dependabot\"
and .baseRefName == \"master\"
and .baseRefName == \"main\"
and .headRefOid == \"$HEAD_SHA\") | .number")
if [ -z "$pr" ]; then
echo "No open Dependabot pull request into master at $HEAD_SHA; nothing to do."
echo "No open Dependabot pull request into main at $HEAD_SHA; nothing to do."
exit 0
fi
gh pr merge "$pr" -R "$REPO" --merge --delete-branch --match-head-commit "$HEAD_SHA"
Expand All @@ -49,7 +49,7 @@ jobs:
# so the deployment is started explicitly.
- name: Deploy
if: env.MERGED == 'true'
run: gh workflow run deploy.yml -R "$REPO" --ref master
run: gh workflow run deploy.yml -R "$REPO" --ref main

- uses: actions/checkout@v7.0.1
if: env.MERGED == 'true'
Expand All @@ -62,8 +62,8 @@ jobs:
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git fetch origin master
git merge --no-edit origin/master
git fetch origin main
git merge --no-edit origin/main
git push origin develop

notify:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Builds the site and publishes it to GitHub Pages on every push to master.
# Builds the site and publishes it to GitHub Pages on every push to main.
# Requires Settings → Pages → Source: "GitHub Actions".

name: Deploy

on:
push:
branches: [master]
branches: [main]
workflow_dispatch:

# One deployment at a time; a newer push does not cancel one in progress.
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/node-lts.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Moves the site to the newest Node LTS, which Dependabot does not do: once a
# month, if an LTS line newer than .nvmrc has been LTS for at least 14 days,
# runs CI on it, and only if CI passes, commits the new .nvmrc to master,
# runs CI on it, and only if CI passes, commits the new .nvmrc to main,
# deploys, and brings develop up to date.

name: Node LTS
Expand All @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v7.0.1
with:
ref: master
ref: main

- name: Find a newer LTS line, at least 14 days old
id: lts
Expand Down Expand Up @@ -59,24 +59,24 @@ jobs:
steps:
- uses: actions/checkout@v7.0.1
with:
ref: master
ref: main
fetch-depth: 0

- name: Commit the new .nvmrc to master
- name: Commit the new .nvmrc to main
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
echo "$MAJOR" > .nvmrc
git commit -am "build(node): move to Node $MAJOR, the active LTS"
git push origin master
git push origin main

# A push made with the workflow token does not trigger other workflows,
# so the deployment is started explicitly.
- name: Deploy
run: gh workflow run deploy.yml --ref master
run: gh workflow run deploy.yml --ref main

- name: Bring develop up to date
run: |
git checkout develop
git merge --no-edit master
git merge --no-edit main
git push origin develop
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ and hold no text of their own, except section headings.
The first time, `npx playwright install chromium webkit` downloads the test
browsers: Chrome, and Safari's engine.
4. Open a pull request into `develop`. CI runs the same checks; it must pass.
5. To publish, merge `develop` into `master`. `deploy.yml` builds and deploys.
5. To publish, merge `develop` into `main`. `deploy.yml` builds and deploys.

## Standards the checks hold

Expand Down Expand Up @@ -55,13 +55,13 @@ checked against every background it sits on.

Dependencies update themselves; nobody has to accept a pull request.

- Every Monday, Dependabot opens, against `master` and with releases at least
- Every Monday, Dependabot opens, against `main` and with releases at least
14 days old (`cooldown` in `.github/dependabot.yml`), one grouped pull
request for the minor and patch updates of npm and one of GitHub Actions,
and one pull request per major update. Security fixes come as soon as they
are published.
- CI runs on each: format, types, build, browser tests, Lighthouse budgets.
- If CI passes, `dependabot-merge.yml` merges it, deploys, and merges `master`
- If CI passes, `dependabot-merge.yml` merges it, deploys, and merges `main`
back into `develop`.
- If CI fails, the pull request stays open, nothing ships, and a comment
notifies the owner. A major that is not supported yet by another package
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ npm test # browser tests, then Lighthouse budgets, on the last buil

## Where things are

| Path | What it holds |
| --------------------- | ----------------------------------------------------------------------- |
| `src/data/profile.ts` | **All the content**: experience, certifications, publications, links |
| `src/components/` | One component per section of the page |
| `src/layouts/` | The HTML shell: metadata, fonts, theme selection |
| `src/styles/` | Design tokens for the four themes, and base styles |
| `src/assets/` | Portrait, badges and logos; optimised at build time (AVIF, WebP) |
| `public/` | Files served as they are: favicons |
| `.github/workflows/` | `ci.yml` checks pull requests; `deploy.yml` publishes `master` to Pages |
| Path | What it holds |
| --------------------- | --------------------------------------------------------------------- |
| `src/data/profile.ts` | **All the content**: experience, certifications, publications, links |
| `src/components/` | One component per section of the page |
| `src/layouts/` | The HTML shell: metadata, fonts, theme selection |
| `src/styles/` | Design tokens for the four themes, and base styles |
| `src/assets/` | Portrait, badges and logos; optimised at build time (AVIF, WebP) |
| `public/` | Files served as they are: favicons |
| `.github/workflows/` | `ci.yml` checks pull requests; `deploy.yml` publishes `main` to Pages |

To update the site, edit `src/data/profile.ts`. A new badge or logo goes in
`src/assets/` and is imported there.
Expand All @@ -52,7 +52,7 @@ served from this site.

## Deployment

A push to `master` builds the site and publishes it with GitHub Actions
A push to `main` builds the site and publishes it with GitHub Actions
(`deploy.yml`). Work happens on `develop`; pull requests are checked by `ci.yml`.
Dependencies, and Node, update and deploy themselves once CI passes
(`dependabot-merge.yml`, `node-lts.yml`).
Expand Down
Loading