chore: update config for docs#43
Closed
tonywu6 wants to merge 1 commit intosecretflow:mainfrom
tonywu6:main
Closed
chore: update config for docs#43tonywu6 wants to merge 1 commit intosecretflow:mainfrom tonywu6:main
tonywu6 wants to merge 1 commit intosecretflow:mainfrom
tonywu6:main
Conversation
tongke6
added a commit
that referenced
this pull request
Jun 16, 2025
## Background Documentation-related config requires updating. > This was #43 which was accidentally closed. ## Changed - Added `docs/CONTRIBUTING.md` which includes instructions on locally building and previewing docs - Updated `docs/requirements.txt` - Removed redundant dependencies - Updated `docs/conf.py` - Removed redundant HTML-related config - Fixed links that become invalid after config changes - Fixed links that were no longer in the recommended format ## NOT changed ### Contents and translations Source texts and translations may need to be updated. Check for warnings and/or missing translations locally after this PR. ### Publishing in CI **Previously, doc publishing has been done using a GitHub Actions workflow that was privately maintained and opaque to repo developers. Starting on June 10, said workflow will cease to function.** Maintainers are encouraged to configure CI on a repo-by-repo basis. This PR does NOT update existing CI to enable publishing docs. The general advice for publishing in CI is as follows: 1. Prerequisites are Python **and Node**. With GitHub Actions, that would be: ```yaml - uses: actions/setup-node@v4 with: node-version: "22" - uses: actions/setup-python@v5 with: python-version: "3.10" ``` 2. The building step should be the same as when working locally, that is: ```sh python -m pip install -r docs/requirements.txt secretflow-doctools build --lang zh_CN ``` 3. The publish command is: ```sh secretflow-doctools publish \ --name @secretflow/x-interconnection \ --index-js docs/_build/esm/index.js ``` The following options are **required**: - `--name @secretflow/x-interconnection` — name of the [npm package][npm] - `--index-js docs/_build/esm/index.js` — path to the package entrypoint; this is the default location The following [environment variables][env] are also **required**: - `DRY_RUN` — publishing will proceed **if and only if `DRY_RUN=0`**; you may omit this during test runs - `DOCTOOLS_PUBLISH_NPM_TOKEN` — npm token, which should be configured as a secret; example using GitHub Actions: ```yaml - run: | secretflow-doctools publish [...] env: DRY_RUN: "0" # omit in test runs DOCTOOLS_PUBLISH_NPM_TOKEN: ${{secrets.DOCTOOLS_PUBLISH_NPM_TOKEN}} ``` > [!IMPORTANT] > > Other things to note: > > - The published version number is [extracted from git tags][versioning]. In CI, make sure that tags are fetched. > - The publish command will bail if it detects there are uncommitted changes at runtime (as a safety measure). In CI, make sure to either not generate additional files, or ignore them in gitignore. > - The publish command no longer sends out Webhook notifications. Configure a separate CI step after if needed. [npm]: https://www.npmjs.com/package/@secretflow/x-interconnection [env]: https://github.com/secretflow/doctools/blob/main/CONTRIBUTING.md#environment-variables [versioning]: https://github.com/secretflow/doctools/blob/main/CONTRIBUTING.md#version-tagging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Documentation-related config requires updating.
Changed
docs/CONTRIBUTING.mdwhich includes instructions on locally building and previewing docsdocs/requirements.txtdocs/conf.pyNOT changed
Contents and translations
Source texts and translations may need to be updated. Check for warnings and/or missing translations locally after this PR.
Publishing in CI
Previously, doc publishing has been done using a GitHub Actions workflow that was privately maintained and opaque to repo developers. Starting on June 10, said workflow will cease to function.
Maintainers are encouraged to configure CI on a repo-by-repo basis. This PR does NOT update existing CI to enable publishing docs.
The general advice for publishing in CI is as follows:
Prerequisites are Python and Node. With GitHub Actions, that would be:
The building step should be the same as when working locally, that is:
The publish command is:
The following options are required:
--name @secretflow/x-interconnection— name of the npm package--index-js docs/_build/esm/index.js— path to the package entrypoint; this is the default locationThe following environment variables are also required:
DRY_RUN— publishing will proceed if and only ifDRY_RUN=0; you may omit this during test runsDOCTOOLS_PUBLISH_NPM_TOKEN— npm token, which should be configured as a secret; example using GitHub Actions:Important
Other things to note: