This repository contains the built documentation for PlanExe, hosted on GitHub Pages at docs.planexe.org.
The documentation source files are maintained in the main PlanExe repository in the docs directory. This repository contains the compiled output from MkDocs Material, which is automatically deployed to GitHub Pages.
- Source: PlanExeOrg/PlanExe/docs
- Build Tool: MkDocs Material
- Output: This repository (deployed to GitHub Pages)
- Domain: docs.planexe.org
- Python 3.8+
- pip
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Clone both repositories:
# Clone this repo git clone https://github.com/PlanExeOrg/PlanExe-docs.git cd PlanExe-docs # Clone the PlanExe repo (adjust path as needed) git clone https://github.com/PlanExeOrg/PlanExe.git ../PlanExe
-
Build the documentation:
python build.py
Or manually:
# Copy docs from PlanExe repo cp -r ../PlanExe/docs/* docs/ # Build mkdocs build
-
Preview locally:
python serve.py
Then open http://127.0.0.1:18525 in your browser.
If your PlanExe repo is in a different location:
PLANEXE_REPO=/path/to/PlanExe DOCS_SOURCE_DIR=docs python build.py-
Build the documentation:
python build.py
-
Copy the
site/directory contents to the repository root:cp -r site/* .
-
Commit and push:
git add . git commit -m "Update documentation" git push
See .github/workflows/deploy.yml for GitHub Actions automation.
Why doesn’t the site rebuild when I push docs changes in PlanExe?
The docs site is built and deployed from this repo (PlanExe-docs). Pushing to the PlanExe repo does not run workflows here. Rebuilds happen when:
- Someone pushes to
mainon PlanExe-docs (this repo), or - Someone manually runs the “Deploy Documentation” workflow in PlanExe-docs (Actions → Deploy Documentation → Run workflow), or
- The PlanExe repo triggers a rebuild when
docs/changes onmain.
For (3), the PlanExe repo has a workflow (.github/workflows/docs-update.yml) that sends a repository_dispatch to this repo when files under docs/ change. For that to work you must configure a secret in the PlanExe repo named PLANEXE_DOCS_DISPATCH_TOKEN (PlanExe → Settings → Secrets and variables → Actions).
Token value: use a GitHub Personal Access Token that can trigger workflows in this repo. A fine-grained token is recommended (narrower permissions). Fine-grained tokens have a maximum expiration of 1 year, so the secret must be renewed annually.
Create or renew the fine-grained token:
- Go to GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens.
- Generate new token (or open an existing one to regenerate/check expiry).
- Token name: e.g.
PlanExe docs dispatch. - Expiration: set the maximum (1 year); add a calendar reminder to renew before it expires.
- Resource owner: your user or the org that owns PlanExe.
- Repository access: Only select repositories → choose PlanExeOrg/PlanExe-docs.
- Permissions → Repository permissions: set Contents to Read and write (required for the
repository_dispatchAPI; Actions alone is not enough). - Generate the token, copy it (it is shown only once), then in the PlanExe repo update the
PLANEXE_DOCS_DISPATCH_TOKENsecret with this value.
Alternative: a classic PAT with repo scope also works and can have a longer or no expiration.
If the secret is missing or expired, the “Notify docs deploy” job in PlanExe will fail and the site will not rebuild. Until the token is set, use option (2) and manually run “Deploy Documentation” in PlanExe-docs after merging docs changes.
Troubleshooting deployment
The main place to check is the PlanExe-docs Actions page: github.com/PlanExeOrg/PlanExe-docs/actions. There you can see all workflow runs: “Deploy Documentation” (builds the site and deploys to GitHub Pages) and “pages build and deployment” (GitHub’s Pages publish). Runs triggered by a docs change in PlanExe show the event docs-updated and “Repository dispatch triggered by …”. Use this page to confirm a deploy ran, re-run a failed workflow, or manually start “Deploy Documentation” (Actions → Deploy Documentation → Run workflow).
- Site didn’t update after pushing to PlanExe/docs? Open the PlanExe-docs Actions page. If there is no “Deploy Documentation” run for your push, the trigger from PlanExe likely failed — check the PlanExe Actions tab: a failed “Notify docs deploy” job will show the API error (e.g. token missing Contents: Read and write). If “Deploy Documentation” ran but failed, open that run and fix the error shown in the logs. If it succeeded, wait a minute or two for GitHub Pages to update and try a hard refresh (Ctrl+Shift+R / Cmd+Shift+R) or a private window to avoid cache.
- “Notify docs deploy” succeeded in PlanExe, but no “Deploy Documentation” run appears in PlanExe-docs? The dispatch API may have rejected the request (e.g. 403). Fine-grained tokens need Contents: Read and write on PlanExe-docs; Actions alone is not enough. Update the token with that permission and update
PLANEXE_DOCS_DISPATCH_TOKENin the PlanExe repo. After the change, the PlanExe workflow fails the job and prints the API response when the dispatch is rejected, so the exact error will appear in PlanExe Actions.
The MkDocs configuration is in mkdocs.yml. Key settings:
- Site URL: https://docs.planexe.org
- Theme: Material for MkDocs
- Source: Points to PlanExe repo's
docsdirectory
To contribute to the documentation:
- Edit files in the PlanExe repository's
docsdirectory - Build and test locally using the instructions above
- Submit a pull request to the PlanExe repository
- After merging, rebuild and deploy to this repository
MIT License - see LICENSE file.