Publish from GitHub
Keep your OpenAPI spec in a GitHub repo, and Specway can publish it every time a change merges. It can also publish a folder of Markdown guides and your changelog from the same repo.
There are two ways to set it up:
| | Specway Docs app | Workflow file | |---|---|---| | Setup | Install the app and pick a repo | Add a workflow file and a secret | | Pull requests | A comment listing what changes, and a Specway check | Optional, from your own workflow | | Runs on | Specway, after GitHub sends the event | Your GitHub Actions minutes |
Most teams should use the app. Use a workflow file when your spec is generated during a build, so it isn't in the repo as a file.
Connect a repo with the Specway Docs app
You need to be an owner or admin of your Specway workspace.
Open your API from the APIs tab. Under Spec, find Publish from GitHub and click Connect a repo.
Click Install on GitHub. Choose the account or organization, pick the repositories Specway may read, and click Install & Authorize. GitHub sends you back to the API's page.
Choose the Repository and Branch, then enter the Spec file path, such as openapi.yaml. Add a Guides folder and a Changelog if you keep them in the repo.
Click Connect.
Repository missing from the list? Click Change what Specway can read on GitHub and add it on GitHub.
What happens on a pull request
When a pull request into your branch changes the spec, guides or changelog, Specway posts one comment on it and updates that comment on every push. The comment lists:
- breaking changes first, such as a removed endpoint,
- other changes, such as added endpoints,
- the guide pages and changelog posts that will publish on merge.
The pull request also gets a Specway check. It passes when nothing breaks. Tick Fail the check when a pull request has a breaking change to make it fail instead, then make the check required in your branch protection rules so a breaking change can't merge by accident.
What happens on merge
When a push to your branch touches the spec, guides or changelog, Specway publishes them, and the commit gets a Published to Specway docs check. Pushes that change other files are ignored.
The API's page shows the result under Publish from GitHub, for example "Last published from your-org/api (3086c42) 2 minutes ago".
Guides folder
- A subfolder is a section. Its
index.mdorREADME.mdgives the section its title and intro, and every other file in it is a page. - A page's title comes from frontmatter
title, then the first# heading, then the file name. - Order comes from frontmatter
orderorsidebar_position, then a number prefix such as01-intro.md, then A to Z. - Markdown and MDX both work. Note, Tip and Warning callouts become quotes.
Sections published from the repo replace each other on every merge. Sections you wrote in the editor are never touched.
Changelog
Point Changelog at either:
- one
CHANGELOG.mdwhere each## [1.4.0] - 2026-11-30heading is a post (an "Unreleased" section is skipped), or - a folder with one Markdown file per post, with
titleanddatein the frontmatter.
A post that disappears from the repo is removed from your changelog. Posts written in the app stay.
Use a workflow file instead
Click Use a workflow file under Publish from GitHub. Specway shows each step for your repo:
- Create a key.
- Save it in the repo as a secret named
SPECWAY_TOKEN. The page gives you thegh secret setcommand and a link to the repo's Actions secrets. - Add the GitHub Actions workflow. Add to followed by your repo's name opens GitHub with the file already filled in.
The workflow runs the Specway sync action on every push to your branch.
Disconnect
Click Disconnect under Publish from GitHub. Your docs stay as they are. To remove Specway's access on GitHub as well, uninstall the Specway Docs app from your GitHub settings.