diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8dc788f..398e833 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aade667..4694b01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/.github/workflows/dependabot-merge.yml b/.github/workflows/dependabot-merge.yml index c923534..1562ff3 100644 --- a/.github/workflows/dependabot-merge.yml +++ b/.github/workflows/dependabot-merge.yml @@ -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" @@ -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' @@ -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: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d928cb8..57fe807 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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. diff --git a/.github/workflows/node-lts.yml b/.github/workflows/node-lts.yml index c857fd8..f3b3537 100644 --- a/.github/workflows/node-lts.yml +++ b/.github/workflows/node-lts.yml @@ -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 @@ -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 @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d678eb6..681f4ce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 @@ -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 diff --git a/README.md b/README.md index 58e6072..cea3d3c 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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`).