This repository contains the source files for the Spice.ai OSS documentation website.
To view the published documentation, visit https://docs.spiceai.org.
To contribute to the documentation, follow the instructions below to set up a local development environment.
The Spice docs are built with Docusaurus and hosted on Cloudflare Pages. The Deployment section describes how changes are published.
The website directory contains the Docusaurus project, markdown files, and theme configurations.
- Node.js 24 or later
- npm (included with Node.js)
Docusaurus is installed as a project dependency and does not need to be installed globally.
- Ensure pre-requisites are installed
- Clone this repository
git clone https://github.com/spiceai/docs.git- Change to website directory:
cd ./docs/website- Install npm packages:
npm install- Ensure you are in the
websitedirectory. - Start the development server:
npm start- Open
http://localhost:3000/in a browser. The local documentation site should appear, and changes to markdown files are reflected automatically.
-
Fork this repository to your GitHub account.
-
Clone your fork and create a new branch:
git checkout -b my-docs-update
-
Make changes to the markdown files in
website/docs/. -
Commit and push your changes:
git add . git commit -m "docs: describe your change" git push origin my-docs-update
-
Open a pull request from your branch to the
trunkbranch of the upstream repository. -
GitHub Actions builds the pull request. For a pull request from a branch in this repository, it also deploys a preview site and links it in a pull request comment. Pull requests from forks are built but not deployed (see Deployment).
The build_and_publish workflow builds the site in GitHub Actions and uploads website/build to the spiceai-org-website Cloudflare Pages project with wrangler pages deploy. A push to trunk deploys to production at spiceai.org and starts an Algolia search reindex. For a pull request, the workflow deploys a preview and comments its URL on the pull request. Pull requests from forks are built but not deployed, because GitHub does not pass secrets, such as the Cloudflare API token, to workflows triggered from a fork.
The repository is also connected to the Cloudflare Pages project, but Cloudflare's automatic Git deployments are turned off (the project's deployments_enabled setting is false), so GitHub Actions is the only deploy path. If automatic deployments are turned back on, every Cloudflare build fails with ENOENT: no such file or directory, open '/opt/buildhome/repo/package.json', because the project's root directory is empty and the Docusaurus project is in website/.
To build in Cloudflare instead, set the project's root directory to website and its NODE_VERSION environment variable to 24, and turn automatic Git deployments back on. Then change the workflow:
- Remove the deploy step, so each push deploys once.
- Remove the pull request comment step, which posts the deploy step's URL.
- Start the Algolia reindex only after Cloudflare finishes a successful production deployment. Without the deploy step, the current reindex step would run right after the workflow's build, before Cloudflare publishes the new site.