Deploy your site
This template includes automatic deployment to GitHub Pages using GitHub Actions. Every time you push changes to the main branch, your site is automatically built and deployed!
Automatic Deployment (Recommended)
Your documentation site is configured for zero-configuration deployment:
How it works
- Push to main branch: Make changes and commit them to the
main
branch - GitHub Actions triggers: The deploy workflow automatically starts
- Site builds and deploys: Your updated documentation appears on GitHub Pages
Viewing your deployed site
Your site is automatically available at:
https://YOUR-USERNAME.github.io/YOUR-REPOSITORY-NAME/
Monitoring deployments
You can watch the deployment process:
- Go to your repository on GitHub
- Click the Actions tab
- View the "Deploy Docs" workflow runs
- Click on any run to see detailed logs
The deployment workflow (deploy.yml
) handles:
- Installing dependencies with
yarn install
- Building the site for production
- Deploying to GitHub Pages using the GitHub Actions bot
- Setting up environment variables automatically
Manual Build and Test (Optional)
If you want to test your site locally before deploying:
Build your site
Build your site for production:
yarn build
The static files are generated in the build
folder.
Test your production build
Test your production build locally:
yarn serve
The build
folder is now served at http://localhost:3000/
.
Troubleshooting Deployment
Common issues:
- Deployment failing: Check the Actions tab for error logs
- Site not updating: Ensure you're pushing to the
main
branch - Contributors not showing: Set up environment variables locally (see Set Environment Variables)
- Build errors: Run
yarn build
locally to test before pushing
GitHub Pages setup
Make sure GitHub Pages is enabled:
- Go to your repository Settings
- Scroll to Pages section
- Set source to "Deploy from a branch"
- Select the
gh-pages
branch (created automatically by the workflow)
What happens during deployment
The GitHub Actions workflow:
- Checks out your code from the main branch
- Installs dependencies using yarn
- Extracts repository info for the contributors component
- Builds the static site with production optimizations
- Deploys to GitHub Pages using the built-in GitHub token
No manual deployment steps needed - just push your changes! 🚀