Skip to content

Commit 025d862

Browse files
fix: Automate versioned documentation publication
Fixes feast-dev#6762 Signed-off-by: Larry Singleton <[email protected]>
1 parent e79bd33 commit 025d862

4 files changed

Lines changed: 632 additions & 4 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ on:
3535
required: true
3636
default: true
3737
type: boolean
38+
secrets:
39+
GITBOOK_TOKEN:
40+
description: 'Token used to publish versioned documentation'
41+
required: true
3842

3943
jobs:
4044
get_dry_release_versions:
@@ -196,3 +200,27 @@ jobs:
196200
run: |
197201
git checkout -B stable origin/${GITHUB_REF#refs/heads/}
198202
git push origin stable --force
203+
204+
publish_versioned_docs:
205+
name: Publish versioned documentation
206+
if: github.event.inputs.dry_run == 'false'
207+
runs-on: ubuntu-latest
208+
needs: [get_dry_release_versions, release]
209+
permissions:
210+
contents: write
211+
env:
212+
GITHUB_TOKEN: ${{ github.event.inputs.token }}
213+
GITBOOK_TOKEN: ${{ secrets.GITBOOK_TOKEN }}
214+
GITBOOK_ORG_ID: ${{ vars.GITBOOK_ORG_ID }}
215+
GITBOOK_SITE_ID: ${{ vars.GITBOOK_SITE_ID }}
216+
steps:
217+
- name: Checkout code
218+
uses: actions/checkout@v4
219+
with:
220+
fetch-depth: 0
221+
persist-credentials: false
222+
223+
- name: Publish released documentation
224+
run: |
225+
python infra/scripts/release/publish_versioned_docs.py \
226+
--version "${{ needs.get_dry_release_versions.outputs.next_version }}"

‎docs/project/release-process.md‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,29 @@ We verify the building the wheels and Docker images in **your fork** of Feast, n
110110
- [Maven repo (feast-datatypes, feast-serving-client)](https://mvnrepository.com/artifact/dev.feast)
111111

112112
### 4. (for minor releases) Post-release steps
113-
#### 4a: Creating a new branch
114-
Create a new branch based on master (i.e. v0.22-branch) and push to the main Feast repo. This will be where
115-
cherry-picks go for future patch releases and where documentation will point.
113+
#### 4a: Versioned branch and documentation publication
114+
115+
The `publish_versioned_docs` release job creates the `v<major>.<minor>-branch` maintenance branch
116+
at the released tag, imports that branch into a versioned GitBook space, and makes the new space
117+
the public default. It verifies the final GitBook state before succeeding.
118+
119+
The repository must define `GITBOOK_ORG_ID` and `GITBOOK_SITE_ID` variables and a scoped
120+
`GITBOOK_TOKEN` secret with permission to create and update spaces, update the site, and publish
121+
it. The release token must be able to create the maintenance branch.
122+
123+
The job is safe to rerun. It reuses matching branches and spaces, but it will not move an existing
124+
maintenance branch that points somewhere other than the released tag. It also leaves the previous
125+
documentation version as the public default until the new branch has imported successfully.
116126

117127
#### 4b: Adding a high level summary in the GitHub release notes
118128
By default, Semantic Release will pull in messages from commits (features vs fixes, etc). But this is hard to digest,
119129
so it helps to have a high level overview. See https://github.com/feast-dev/feast/releases for the releases.
120130

121131
#### 4c: Update documentation
122132

123-
In the Feast Gitbook:
133+
If the automated documentation job fails, use its error as the recovery point and complete the
134+
remaining steps in the Feast GitBook:
135+
124136
1. Create a new space within the Feast collection
125137
2. Go to the overflow menu on the top -> Synchronize with Git
126138
1. Specify GitHub as the provider

0 commit comments

Comments
 (0)