Skip to content

Commit 2936382

Browse files
authored
ci: add docs-release-* tag workflow to publish docs at release (#3969)
## Summary Docs deploy from the `docs-live` branch via Mintlify, so merging to `main` no longer publishes docs on its own. To publish, push a `docs-release-*` tag at the commit you want live. The workflow runs the Mintlify broken-links check against that commit, then fast-forwards `docs-live` to it, which is what Mintlify deploys from. ## Design The ref move uses the GitHub API with `force=false`, making it fast-forward only: a tag that is not ahead of `docs-live` fails the job rather than rewinding production. Mintlify's GitHub app reacts to the resulting push and deploys, so no extra deploy credentials are needed. Usage: ```bash git tag docs-release-2026.06.16 # tag the main commit you want live git push origin docs-release-2026.06.16 ```
1 parent afe6dd9 commit 2936382

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/publish-docs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: 📚 Publish docs
2+
3+
on:
4+
push:
5+
tags:
6+
- "docs-release-*"
7+
8+
# Only needs to move the docs-live ref; Mintlify's GitHub app deploys from it.
9+
permissions:
10+
contents: write
11+
12+
concurrency:
13+
group: publish-docs
14+
cancel-in-progress: false
15+
16+
jobs:
17+
publish:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: 📥 Checkout tagged commit
21+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22+
with:
23+
persist-credentials: false
24+
25+
- name: 🔗 Check for broken links
26+
working-directory: ./docs
27+
run: npx mintlify@4.0.393 broken-links
28+
29+
- name: 🚀 Fast-forward docs-live to the tagged commit
30+
env:
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: |
33+
gh api -X PATCH \
34+
"repos/${{ github.repository }}/git/refs/heads/docs-live" \
35+
-f sha="${{ github.sha }}" \
36+
-F force=false

0 commit comments

Comments
 (0)