This directory contains the GitHub Actions workflows for the AllTheory documentation project.
Trigger: Push to main branch or manual workflow dispatch
Purpose: Automatically builds and deploys the documentation to GitHub Pages
Steps:
- Checkout code
- Setup Node.js 18
- Install dependencies
- Build the website (both English and Chinese locales)
- Upload build artifacts
- Deploy to GitHub Pages
Trigger: Pull requests to main branch or pushes to main
Purpose: Validates that the documentation builds successfully
Features:
- Tests on multiple Node.js versions (18.x, 20.x)
- Runs TypeScript type checking
- Verifies build output structure
- Ensures both locales build correctly
To enable GitHub Pages for your repository:
- Go to Settings → Pages
- Under "Build and deployment", select "GitHub Actions" as the source
- The deploy workflow will automatically run when you push to main
To test the workflows locally before pushing:
# Test the build
npm run build
# Test TypeScript
npm run typecheck
# Serve the built site locally
npm run serveIf the build fails:
- Check for broken links (the build will fail on broken links)
- Ensure all markdown files have proper frontmatter
- Verify LaTeX syntax in mathematical expressions
If deployment fails:
- Ensure GitHub Pages is enabled in repository settings
- Check that the
gh-pagesbranch protection rules allow the workflow - Verify the repository has the correct permissions set
The deployment configuration is in docusaurus.config.ts:
url: Your GitHub Pages URLbaseUrl: The path where the site is served (usually/<repo-name>/)organizationName: Your GitHub username or organizationprojectName: Your repository name