Deployment Troubleshooting
If your site is not automatically deploying, check the following:
1. GitHub Pages Configuration
Critical: GitHub Pages must be configured to use GitHub Actions, not a branch.
- Go to your repository on GitHub
- Click Settings → Pages
- Under Source, select GitHub Actions (NOT "Deploy from a branch")
- Save the settings
If you see "Deploy from a branch" selected, that's the problem! Change it to "GitHub Actions".
2. Check Branch Name
The workflow triggers on pushes to main or master branches. Verify your default branch:
- Go to Settings → Branches
- Check what your default branch is named
- If it's not
mainormaster, update the workflow file:
on:
push:
branches:
- your-branch-name
3. Check Workflow Permissions
The workflow needs proper permissions. Verify in .github/workflows/deploy.yml:
permissions:
contents: read
pages: write
id-token: write
4. Check Actions Tab
- Go to the Actions tab in your repository
- Check if the workflow is running
- If it's not running, check for any error messages
- If you see "Workflow run is waiting for a runner", wait a moment
5. Manual Trigger
Try triggering the workflow manually:
- Go to Actions tab
- Select Deploy to GitHub Pages workflow
- Click Run workflow button
- Select your branch
- Click Run workflow
6. Check Workflow Logs
If the workflow runs but fails:
- Click on the workflow run
- Check each step for errors
- Common issues:
- Missing dependencies
- Build errors
- Permission errors
7. Verify Workflow File Location
Ensure the workflow file is at:
.github/workflows/deploy.yml
8. First Time Setup
If this is your first deployment:
- Make sure you've pushed the workflow file to GitHub
- Go to Settings → Pages
- Select GitHub Actions as the source
- Push a change to trigger the workflow
9. Check Repository Settings
Ensure GitHub Actions is enabled:
- Go to Settings → Actions → General
- Under Workflow permissions, select:
- "Read and write permissions"
- "Allow GitHub Actions to create and approve pull requests"
- Save changes
Still Not Working?
If none of the above works:
- Check the Actions tab for specific error messages
- Verify your repository is public (or you have GitHub Pro/Team for private repos)
- Try deleting and recreating the workflow file
- Check GitHub status page for any service issues