Skip to content

Commit 08a785b

Browse files
Update to sphinx documentation (#3078)
This updates our website to use sphinx for its documentation site. This includes some new content around the SQL API, as well as our API Javadoc, which we will be publishing ourselves for the first time in a while. Publishing happens at the end of the release process (which I've been able to test by first applying these changes to a test repo of mine). --------- Co-authored-by: FDB Relational Layer Authors <[email protected]>
1 parent 565a6da commit 08a785b

File tree

91 files changed

+3263
-77
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+3263
-77
lines changed

.github/workflows/mixed_mode_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: Checkout Main
4141
run: git checkout main
4242
- name: Update release notes
43-
run: python build/publish-mixed-mode-results.py ${{ inputs.tag }} --release-notes docs/ReleaseNotes.md --commit --run-link ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
43+
run: python build/publish-mixed-mode-results.py ${{ inputs.tag }} --release-notes docs/sphinx/source/ReleaseNotes.md --commit --run-link ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
4444
- name: Push release notes update
4545
run: git push
4646

.github/workflows/release.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ jobs:
1010
checks: write
1111
contents: write
1212
packages: write
13-
pages: write
1413
pull-requests: write
1514
steps:
1615
- name: Checkout sources
1716
uses: actions/[email protected]
1817
with:
1918
ssh-key: ${{ secrets.DEPLOY_KEY }}
2019
- name: Setup Base Environment
20+
id: setup-base
2121
uses: ./actions/setup-base-env
2222
- name: Setup FDB
2323
uses: ./actions/setup-fdb
@@ -44,4 +44,31 @@ jobs:
4444
MAVEN_USER: ${{ secrets.MAVEN_USER }}
4545
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
4646

47-
# TODO: Publish documentation updates
47+
# Build documentation.
48+
- name: Cache Python Environment
49+
uses: actions/cache@v4
50+
with:
51+
path: docs/sphinx/.venv
52+
key: ${{ runner.os }}-sphinx-python-${{ steps.setup-base.outputs.python-version }}-${{ hashFiles('docs/sphinx/requirements.txt') }}
53+
- name: Build Documentation Site
54+
uses: ./actions/run-gradle
55+
with:
56+
gradle_command: documentationSite -PreleaseBuild=true
57+
- name: Upload Documentation
58+
id: doc_upload
59+
uses: actions/upload-pages-artifact@v3
60+
with:
61+
path: docs/sphinx/.out/html/
62+
63+
deploy_docs:
64+
runs-on: ubuntu-latest
65+
needs: gradle
66+
permissions:
67+
pages: write
68+
id-token: write
69+
environment:
70+
name: github-pages
71+
url: ${{ steps.doc_upload.outputs.page_url }}
72+
steps:
73+
- name: Deploy Documentation
74+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ atlassian-ide-plugin.xml
4444
.idea/scala_settings.xml
4545
.idea/shelf
4646

47+
# Built during documentation
48+
/docs/sphinx/.venv
49+
/docs/sphinx/source/api/**/index.md
50+
*.diagram.svg
51+
4752
# VSCode specific files/directories
4853
.vscode
4954
**/bin

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ it is addressing and, upon merging of the PR into the main code line, will
8383
automatically mark the issue as resolved.
8484

8585
If your pull request results in a user-visible change to the Record Layer, you should
86-
also update the [release notes](docs/ReleaseNotes.md). For most changes, it
86+
also update the [release notes](docs/sphinx/source/ReleaseNotes.md). For most changes, it
8787
is sufficient to fill in one of the bullets in the "next release" section of that
8888
document. You should include a short description of the change as well as filling in
8989
the issue number. The "next release" section is commented out, so the change won't

actions/release-build-publish/action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@ runs:
5151
id: push_updates
5252
shell: bash
5353
run: git push origin
54+
# Continue the build (including downstream steps). If the push fails, we'll create a PR
55+
continue-on-error: true
5456
- name: Create Merge PR if conflict
55-
if: failure() && steps.push_updates.conclusion == 'failure'
57+
# Only create the PR if we've otherwise been successful, but the push failed. Note that
58+
# we're checking the .outcome of the push step, which is applied before continue-on-error.
59+
if: success() && steps.push_updates.outcome == 'failure'
5660
uses: peter-evans/create-pull-request@bb88e27d3f9cc69c8bc689eba126096c6fe3dded
5761
id: pr_on_conflict
5862
with:
@@ -62,3 +66,8 @@ runs:
6266
sign-commits: true
6367
body: |
6468
Updates from release for version ${{ steps.get_version.outputs.version }}. Conflicts during the build prevented automatic updating. Please resolve conflicts by checking out the current branch, merging, and then deleting this branch.
69+
70+
# Creating the PR can change the current branch. Explicitly check out the tag here for downstream builds
71+
- name: Revert to tag
72+
shell: bash
73+
run: git checkout "${{ steps.get_version.outputs.version }}"

actions/setup-base-env/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Setup Base Environment
22

3+
outputs:
4+
python-version:
5+
value: ${{ steps.setup-python.outputs.python-version }}
6+
37
runs:
48
using: "composite"
59
steps:
@@ -11,6 +15,7 @@ runs:
1115
- name: Setup Gradle
1216
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6
1317
- name: Setup Python
18+
id: setup-python
1419
uses: actions/setup-python@v5
1520
with:
1621
python-version: '3.13'

build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ subprojects {
240240
linksOffline "https://developers.google.com/protocol-buffers/docs/reference/java/", "${packageListDir}/protobuf/"
241241

242242
// This is for dependent sub-projects so that their links to things in the Record Layer work
243-
linksOffline "https://static.javadoc.io/org.foundationdb/fdb-extensions/${project.version}/", "${packageListDir}/fdb-extensions/"
244-
linksOffline "https://static.javadoc.io/org.foundationdb/fdb-record-layer-core/${project.version}/", "${packageListDir}/fdb-record-layer-core/"
243+
linksOffline "https://foundationdb.github.io/fdb-record-layer/api/fdb-extensions/", "${packageListDir}/fdb-extensions/"
244+
linksOffline "https://foundationdb.github.io/fdb-record-layer/api/fdb-record-layer-core/", "${packageListDir}/fdb-record-layer-core/"
245245
}
246246
}
247247
compileJava {
@@ -333,6 +333,8 @@ clean.doLast {
333333
}
334334
}
335335

336+
apply from: 'gradle/sphinx.gradle'
337+
336338
if (!JavaVersion.current().isJava8Compatible()) {
337339
throw new Exception("Java 8 is required to build fdb-record-layer")
338340
}

build/update_release_notes.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
script_dir="$( dirname $0 )"
3232
success=0
3333

34-
release_notes_file="${script_dir}/../docs/ReleaseNotes.md"
34+
release_notes_file="${script_dir}/../docs/sphinx/source/ReleaseNotes.md"
3535

3636
if [[ -n "${GIT_BRANCH:-}" ]] ; then
3737
branch="${GIT_BRANCH#*/}"

docs/_config.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/_includes/footer.html

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)