Production deploys use only GitHub Actions: build the Docusaurus site and publish
with actions/upload-pages-artifact + actions/deploy-pages. No Vercel or other
host tokens are required in the repo.
-
Open the repo on GitHub → Settings → Pages (left sidebar under “Code and automation”).
-
Under Build and deployment → Source, choose GitHub Actions (not “Deploy from a branch”).
-
After the first successful run of CI and Deploy on
main, the site will be available at the URL GitHub shows (see below). You can add a Custom domain there (e.g.docs.safrochain.com) and follow the DNS instructions GitHub provides.
No VERCEL_* (or other) secrets are required for this flow.
| Setup | What you get |
|---|---|
Project site (repo documentation) |
https://safrochain-org.github.io/documentation/ |
| Custom domain in Pages settings | Your domain (e.g. https://docs.safrochain.com/) with static/CNAME already in the build |
If you use the default https://<org>.github.io/<repo>/ without a custom domain, set
Docusaurus baseUrl in docusaurus.config.ts to '/<repo>/' (e.g. '/documentation/').
With a custom domain at the root of the site, keep baseUrl: '/' and align url
with the live hostname (already https://docs.safrochain.com in this project).
| Event | What happens |
|---|---|
| Pull request | npm ci → typecheck → lint → build. No deploy. |
Push to main |
Same build, then Upload Pages artifact, then Deploy to GitHub Pages. |
Run workflow on main |
Same as push (manual re-deploy). |
Workflow file: .github/workflows/ci.yml. The environment
github-pages and live URL are created by GitHub when Pages uses Actions.
npm run deployThis runs the same quality steps as CI and stops after build/. Pushing to main
is what updates the live site.
In Settings → Pages → Custom domain, add docs.safrochain.com (or
your host). GitHub will show a CNAME target (usually
<user>.github.io or a verification CNAME). Add that record at your DNS provider; see
GitHub: managing a custom domain.
- “Workflow is not run”: Source must be GitHub Actions, not “branch”.
- 404: Check
baseUrlvs real URL; wait for the green check on the Deploy to GitHub Pages job. - Old Vercel errors in history: Removed; new runs use Pages only.