- Settings → Pages: set Source to GitHub Actions.
- Settings → Actions → General: under Workflow permissions, choose Read and write permissions.
- (Optional) Settings → Environments → github-pages: allow deployments from main (or all branches) so the workflow can publish without manual approval.
- Update
mkdocs.ymlwith your project'ssite_name,site_url, andrepo_url. - Ensure every plugin listed in
mkdocs.ymlalso appears inrequirements.txt.
- Branch
mainnot allowed → relax thegithub-pagesenvironment branch rule or addmainexplicitly. - Multiple artifacts detected → keep only one
actions/upload-pages-artifactstep in the workflow. - Missing MkDocs plugins → install each plugin used by
mkdocs.ymlby adding it torequirements.txt.