This guide will help you deploy your documentation site to GitHub Pages.
- Go to your repository on GitHub:
https://github.com/YesselmanLab/lab-docs - Click on Settings (top right of the repository page)
- Scroll down to Pages in the left sidebar
- Under Source, select "GitHub Actions" (NOT "Deploy from a branch")
- Click Save
The GitHub Actions workflow will automatically run when you push to the main branch. To trigger it:
Option A: Push any change
git add .
git commit -m "Trigger initial deployment"
git push origin mainOption B: Manually trigger the workflow
- Go to the Actions tab in your repository
- Click on "Deploy to GitHub Pages" workflow
- Click "Run workflow" button
- Select the branch (usually
main) and click "Run workflow"
- Go to the Actions tab
- You should see a workflow run in progress
- Wait for it to complete (usually 2-3 minutes)
- Once it shows a green checkmark ✅, your site is deployed!
Your documentation will be available at: https://yesselmanlab.github.io/lab-docs/
Note: It may take a few minutes after deployment for the site to be accessible.
- Navigate to the file you want to edit in the
docs/folder - Click the pencil icon (✏️) to edit
- Make your changes
- Scroll down and click "Commit changes"
- The site will automatically rebuild and deploy (check the Actions tab)
-
Clone the repository (if you haven't already):
git clone https://github.com/YesselmanLab/lab-docs.git cd lab-docs -
Create a virtual environment (recommended):
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Preview locally (optional):
mkdocs serve
Then open http://127.0.0.1:8000 in your browser
-
Make your edits to files in the
docs/directory -
Commit and push:
git add . git commit -m "Update documentation" git push origin main
-
Wait for deployment: Check the Actions tab - the site will automatically rebuild
- Check Actions tab: Make sure the workflow completed successfully
- Check Pages settings: Ensure "GitHub Actions" is selected as the source
- Wait a few minutes: Sometimes it takes 5-10 minutes for changes to propagate
- Go to Actions tab
- Click on the failed workflow run
- Check the error message
- Common issues:
- Missing dependencies: Check
requirements.txt - YAML syntax error: Check
mkdocs.yml - Missing files: Ensure all files referenced in
mkdocs.ymlexist
- Missing dependencies: Check
- Clear browser cache: Hard refresh (Ctrl+Shift+R or Cmd+Shift+R)
- Check deployment: Go to Actions tab and verify the latest deployment succeeded
- Check URL: Make sure you're visiting
https://yesselmanlab.github.io/lab-docs/
- Go to Actions tab
- Click "Deploy to GitHub Pages" workflow
- Click "Run workflow"
- Select branch and click "Run workflow"
docs/- All your documentation markdown filesmkdocs.yml- Configuration file (navigation, theme, etc.).github/workflows/ci.yml- GitHub Actions deployment workflowrequirements.txt- Python dependencies
- Create a new
.mdfile in the appropriatedocs/subdirectory - Add it to the
nav:section inmkdocs.yml - Commit and push
Edit the theme: section in mkdocs.yml
Edit the nav: section in mkdocs.yml
- Check the MkDocs documentation
- Check the Material theme documentation
- Review GitHub Actions logs in the Actions tab