GitHub Pages Deployment
This documentation site is automatically deployed to GitHub Pages using GitHub Actions.
Live Site
The documentation is available at: https://caleb-mabry.github.io/postgres-mcp/
Automatic Deployment
Changes to the documentation are automatically deployed when:
- Code is pushed to the
mainbranch - Files in the
docs/directory are modified - The
.github/workflows/deploy-docs.ymlfile is updated
The deployment workflow:
- Checks out the repository
- Installs Node.js and dependencies
- Builds the Docusaurus site
- Deploys to GitHub Pages
Manual Deployment
If you need to manually deploy:
cd docs
npm install
npm run build
npm run deploy
GitHub Pages Configuration
To enable GitHub Pages for the first time:
- Go to your repository on GitHub
- Navigate to Settings → Pages
- Under Source, select GitHub Actions
- The site will be automatically deployed on the next push to main
Deployment Workflow
The deployment is configured in .github/workflows/deploy-docs.yml:
name: Deploy Documentation to GitHub Pages
on:
push:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/deploy-docs.yml'
workflow_dispatch:
Configuration
The site configuration in docs/docusaurus.config.ts:
{
url: 'https://caleb-mabry.github.io',
baseUrl: '/postgres-mcp/',
organizationName: 'caleb-mabry',
projectName: 'postgres-mcp',
}
Troubleshooting
Deployment Fails
- Check the Actions tab in GitHub for error messages
- Verify GitHub Pages is enabled in repository settings
- Ensure the workflow has proper permissions
Site Not Updating
- Check if the workflow ran successfully in the Actions tab
- Clear your browser cache
- Wait a few minutes for GitHub's CDN to update
404 Errors
- Verify the
baseUrlindocusaurus.config.tsmatches your repository name - Check that all internal links use relative paths
- Rebuild the site locally to test
Local Testing
Test the production build locally before deploying:
cd docs
npm run build
npm run serve
This will serve the production build at http://localhost:3000