CI automation¶
DocsForge adds automation only for the repository's existing CI host.
| Host | Output |
|---|---|
| GitHub | .github/workflows/docs-check.yml, docs-sync.yml |
| GitLab | .documentation/ci/openwiki-update.gitlab-ci.yml + include |
| Bitbucket | Staged custom pipeline |
| No recognized CI | Guidance only; no second CI platform |
GitHub Actions¶
Documentation check¶
Runs on pull requests, pushes, schedule, and manual dispatch.
It validates:
.documentation/config.yml;- documentation structure;
- deterministic audit output;
- screenshot references;
- the project-local toolkit scripts in
.documentation/toolkit/.
Documentation sync¶
Runs daily and on manual dispatch.
It:
- checks out full history;
- installs a pinned OpenWiki version;
- runs
openwiki code --update --print; - removes transient
.run.json; - validates documentation;
- opens a documentation-only PR;
- never auto-merges;
- fails visibly if OpenWiki fails.
add-paths is restricted to:
Secrets and variables¶
Provider credentials are separate from interactive agent sessions.
Example:
| Name | Kind | Purpose |
|---|---|---|
OPENROUTER_API_KEY |
Secret | Model provider |
OPENWIKI_PROVIDER |
Variable | Optional provider override |
OPENWIKI_MODEL_ID |
Variable | Optional model override |
LANGSMITH_API_KEY |
Secret | Optional tracing |
Screenshot CI may also need:
| Name | Kind |
|---|---|
DOCS_BASE_URL |
Variable |
DOCS_USER_EMAIL |
Secret |
DOCS_USER_PASSWORD |
Secret |
Never reuse interactive OAuth credentials in an unattended runner.
Least privilege¶
The sync workflow needs:
The check workflow needs only:
No auto-merge¶
DocsForge never enables auto-merge during setup.
If a repository wants auto-merge later, it must:
- enable GitHub auto-merge;
- add branch protection or a ruleset;
- require the checks that should gate generated docs;
- decide whether human review is still required;
- use a dedicated token with access only to documentation paths.
The default templates do not do this.
GitLab¶
The staged include runs on a schedule or manually and opens a merge request. It requires:
DOCS_GITLAB_TOKENwith repository write and merge-request access;OPENROUTER_API_KEYor another provider key.
Bitbucket¶
The staged custom pipeline requires:
OPENROUTER_API_KEY;DOCS_BITBUCKET_TOKENwith repository write and pull-request access.
Enable a scheduled pipeline in Bitbucket repository settings.
Optional screenshot workflow¶
A template exists at:
It is not enabled by default because it needs:
- a deterministic docs screenshot suite;
- a dedicated test user;
- a CI-startable application;
- screenshot secrets.
Failure behavior¶
- OpenWiki failure fails the job.
- Partial documentation is preserved in the PR/MR so the next run can resume.
- Transient
.run.jsonis removed. - The documentation check uploads an audit artifact.