|
| 1 | +# Documentation Build Process |
| 2 | + |
| 3 | +This directory contains the MyST documentation that gets built and deployed to https://docs.commontools.dev |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +While the main codebase uses Deno, the documentation is built using MyST (mystmd), which is a Node.js-based static site generator for scientific and technical documentation. |
| 8 | + |
| 9 | +## GitHub Actions Deployment |
| 10 | + |
| 11 | +The documentation is automatically built and deployed via GitHub Actions when: |
| 12 | +- Changes are pushed to the `main` branch |
| 13 | +- The changes affect files in the `tutorials/` directory |
| 14 | +- Or when manually triggered via workflow dispatch |
| 15 | + |
| 16 | +The workflow is defined in `.github/workflows/deploy-docs.yml` |
| 17 | + |
| 18 | +## Local Development |
| 19 | + |
| 20 | +To work on the documentation locally, you'll need Node.js (not Deno) for MyST: |
| 21 | + |
| 22 | +```bash |
| 23 | +# Navigate to tutorials directory |
| 24 | +cd tutorials |
| 25 | + |
| 26 | +# Install dependencies (requires Node.js) |
| 27 | +npm install |
| 28 | + |
| 29 | +# Start development server |
| 30 | +npm run dev |
| 31 | + |
| 32 | +# Build static site |
| 33 | +npm run build |
| 34 | +``` |
| 35 | + |
| 36 | +## Configuration |
| 37 | + |
| 38 | +- **MyST Config**: `myst.yml` - Defines the site structure and settings |
| 39 | +- **Custom Domain**: The CNAME file configures the custom domain (docs.commontools.dev) |
| 40 | +- **GitHub Pages**: The site is deployed to GitHub Pages with the custom domain |
| 41 | + |
| 42 | +## Important Notes |
| 43 | + |
| 44 | +1. The MyST build process is completely separate from the Deno-based application code |
| 45 | +2. The GitHub Action uses Node.js to build the documentation |
| 46 | +3. The built HTML is deployed to GitHub Pages |
| 47 | +4. Make sure to configure DNS records to point `docs.commontools.dev` to GitHub Pages |
| 48 | + |
| 49 | +## DNS Configuration Required |
| 50 | + |
| 51 | +For the custom domain to work, you need to configure DNS: |
| 52 | +- Add a CNAME record pointing `docs.commontools.dev` to `<username>.github.io` |
| 53 | +- Or configure it according to GitHub's custom domain documentation |
0 commit comments