You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,3 +5,36 @@ The documentation website is currently hosted on https://chanzuckerberg.github.i
5
5
The documentation site is rebuilt each time a tag is created on the repo, which happens on release. This will include the Sphinx website (for the Python API)
6
6
7
7
A full rebuild can also be triggered manually as the workflow supports `workflow_dispatch`. This should be done if a bug in the documentation is found and a release is not necessary.
8
+
9
+
## Versioned documentation
10
+
11
+
To make sure the documentation on the site refers to the correct version of the Portal API, the site is versioned. This
12
+
means that the documentation pages contain a version switcher listing the available versions. To add a new version to the
13
+
switcher, edit the `version_info` section of the `html_theme_options` config dictionary in `docs/conf.py`. For example,
14
+
15
+
```python
16
+
"version_info": [
17
+
{
18
+
"version": "dev", # version number or path
19
+
"title": "Stable (latest)", # title to be displayed in the dropdown
20
+
"aliases": ["stable"], # list of aliases for the version; not needed for regular versions, only latest/stable
21
+
},
22
+
# Add new versions here
23
+
{
24
+
"version": "v4.0",
25
+
"title": "v4.0",
26
+
"aliases": [""],
27
+
},
28
+
],
29
+
```
30
+
31
+
## Branches
32
+
33
+
Multiple branches are used to manage the documentation:
34
+
-`main`: This branch contains the latest version of the documentation. It is automatically deployed to the `dev` folder of the `gh-pages` branch when a new PR is merged. **This is the default version of the documentation**.
35
+
-`docs-vX.X`: These branches contain the documentation for the specific version of the API. They are automatically deployed to the `vX.X` folder of the `gh-pages` branch when a new release is made, or manually if the `backport-docs` label is used in a new PR.
36
+
-`gh-pages`: This branch contains the generated documentation. It is automatically updated when a new PR is merged to the `main` branch, and needs to be manually updated when the `backport-docs` label is used in a new PR. A symbolic link called `stable` points to the latest version of the documentation, making sure this is the default version of the site.
37
+
38
+
## Backports
39
+
40
+
The latest version of the site is automatically generated and deployed to the `gh-pages` branch whenever a PR is merged to the main branch. However, if a bug is found in the documentation for a previous version, the `backport-docs` GitHub label can be used on a pull request or issue to flag the need for a rebuild of the documentation for that version. In that case, the commits associated with the PR will be (manually) cherry-picked to the `docs-vX.X` branch, and the documentation will need to be rebuilt and deployed to the `gh-pages` branch.
0 commit comments