GitHub Actions
Update your docs on every pull request with Theneoβs GitHub Actions integration.
1
Create your Theneo documentation
Start by creating a documentation project in Theneo to house your API.
2
Set up the GitHub workflow
Add a file named Theneo.yml to .github/workflows/ in your repository, defining the action to run. Here's an example:
name: Update Documentation
on:
pull_request:
branches:
- main
jobs:
update-doc:
name: Update Theneo Documentation
runs-on: ubuntu-latest
steps:
- run: echo "π Triggered by a ${{ github.event_name }} event."
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Update Documentation on Theneo
uses: Theneo-Inc/api-documentation@1.8.0
with:
FILE_PATH: doc/api.yml
PROJECT_SLUG: <project_slug>
VERSION_SLUG: <version_slug>
WORKSPACE_SLUG: <workspace_slug>
SECRET: ${{secrets.SECRET}}
AUTO_PUBLISH: true
IMPORT_OPTION: merge
PARAMETER_DESCRIPTION_MERGE_STRATEGY: keep_new
SECTION_DESCRIPTION_MERGE_STRATEGY: keep_old
INCLUDE_GITHUB_METADATA: true
Theneo API Documentation on GitHub Marketplace
Get the official action and full details on the GitHub Marketplace.
3
Find your project slug
Open your project in Theneo β the slug is part of the URL: https://app.theneo.io/<workspace-name>/<project-slug>/[version-slug]. For example, in https://app.theneo.io/theneo/github-demo, the slug is github-demo. Use it for the PROJECT_SLUG input.
4
Configure the inputs
FILE_PATHβ path to your API documentation file in the repo.PROJECT_SLUGβ your project's unique identifier in Theneo.VERSION_SLUGβ import under a specific version (otherwise the default version is used).WORKSPACE_SLUGβ import under a specific workspace.SECRETβ your Theneo API token, from your Theneo profile.IMPORT_OPTIONβ how to handle the import:overwrite,merge, orendpoints.AUTO_PUBLISHβtruepublishes automatically;falselets you review in the editor first.INCLUDE_GITHUB_METADATAβ include metadata like the GitHub actor (visible only in the Theneo editor).SECTION_DESCRIPTION_MERGE_STRATEGYβkeep_neworkeep_oldfor section descriptions.PARAMETER_DESCRIPTION_MERGE_STRATEGYβkeep_neworkeep_oldfor parameter descriptions.
5
Choose your import option
overwriteβ replace the current documentation with the new spec entirely.mergeβ attempt to merge changes (experimental; may append in some cases).endpointsβ add new endpoints into a dedicated section for manual arrangement.
6
Set auto-publish
trueβ automatically update the published docs with the latest changes.falseβ review in the editor before publishing.
With GitHub Actions, maintaining accurate, current API documentation becomes automated and effortless β your team and users always have the latest.
Per-PR preview deployments
Before changes go live, Theneo can publish a preview deployment for every pull request β a shareable, isolated URL that shows exactly what that PR does to your docs. Reviewers see the fully rendered result, catch issues early, and approve with confidence. When the PR merges, the changes roll into your published documentation.
AI-powered CI audits
Add an AI audit step to your pipeline to automatically review documentation changes on every pull request β flagging unclear descriptions, missing parameters, broken references, and inconsistencies before they reach your readers. Your CI becomes a quality gate for docs, not just code.
Per-PR previews and AI audits plug into your pull-request workflow much like they do on other modern docs platforms β so every change is previewed and quality-checked before it ships. Want a hand wiring them into your repo? hello@theneo.io is happy to help.
On this page
- GitHub Actions