pytorch/functorch/docs
Huy Do bb6b24c622 [BE] Dockerize PyTorch docs jobs (#100601)
Saw some connection error to pip in docs jobs today, so let's dockerize it:

* https://github.com/pytorch/pytorch/actions/runs/4877612277/jobs/8702572072
* https://github.com/pytorch/pytorch/actions/runs/4877612277/jobs/8702572072

Some additional fixes:
* Moving the docs script from under `.circleci` to under `.ci` as they should be
* Linter (as scripts under .ci are subjected to shellcheck)
* Fix some minor Sphinx warnings in functorch docs

### Testing
Docs previews look fine:

* https://docs-preview.pytorch.org/100601/index.html
* https://docs-preview.pytorch.org/100601/cppdocs/index.html
* https://docs-preview.pytorch.org/100601/functorchdocs/index.html

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100601
Approved by: https://github.com/clee2000
2023-05-05 06:24:46 +00:00
..
source [BE] Dockerize PyTorch docs jobs (#100601) 2023-05-05 06:24:46 +00:00
.gitignore
Makefile [functorch] GHA docs build; nbsphinx -> myst-nb (pytorch/functorch#517) 2022-07-21 13:41:22 -07:00
README.md [functorch] Switched docs theme to pytorch-theme (pytorch/functorch#453) 2022-07-21 13:41:21 -07:00
requirements.txt Pin functorch docs requirements (#100257) 2023-04-28 17:58:58 +00:00

functorch docs build

Build Locally

Install requirements:

pip install -r requirements.txt

One may also need to install pandoc. On Linux we can use: sudo apt-get install pandoc. Or using conda we can use: conda install -c conda-forge pandoc.

To run the docs build:

make html

Check out the output files in build/html.

Deploy

The functorch docs website does not updated automatically. We need to periodically regenerate it.

You need write permissions to functorch to do this. We use GitHub Pages to serve docs.

  1. Build the docs
  2. Save the build/html folder somewhere
  3. Checkout the branch gh-pages.
  4. Delete the contents of the branch and replace it with the build/html folder. index.html should be at the root.
  5. Commit the changes and push the changes to the gh-pages branch.