xref: /aosp_15_r20/external/pytorch/functorch/docs/README.md (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1*da0073e9SAndroid Build Coastguard Workerfunctorch docs build
2*da0073e9SAndroid Build Coastguard Worker--------------------
3*da0073e9SAndroid Build Coastguard Worker
4*da0073e9SAndroid Build Coastguard Worker## Build Locally
5*da0073e9SAndroid Build Coastguard Worker
6*da0073e9SAndroid Build Coastguard WorkerInstall requirements:
7*da0073e9SAndroid Build Coastguard Worker```
8*da0073e9SAndroid Build Coastguard Workerpip install -r requirements.txt
9*da0073e9SAndroid Build Coastguard Worker```
10*da0073e9SAndroid Build Coastguard Worker
11*da0073e9SAndroid Build Coastguard WorkerOne may also need to install [pandoc](https://pandoc.org/installing.html). On Linux we can use: `sudo apt-get install pandoc`. Or using `conda` we can use: `conda install -c conda-forge pandoc`.
12*da0073e9SAndroid Build Coastguard Worker
13*da0073e9SAndroid Build Coastguard WorkerTo run the docs build:
14*da0073e9SAndroid Build Coastguard Worker```
15*da0073e9SAndroid Build Coastguard Workermake html
16*da0073e9SAndroid Build Coastguard Worker```
17*da0073e9SAndroid Build Coastguard Worker
18*da0073e9SAndroid Build Coastguard WorkerCheck out the output files in `build/html`.
19*da0073e9SAndroid Build Coastguard Worker
20*da0073e9SAndroid Build Coastguard Worker## Deploy
21*da0073e9SAndroid Build Coastguard Worker
22*da0073e9SAndroid Build Coastguard WorkerThe functorch docs website does not updated automatically. We need to periodically regenerate it.
23*da0073e9SAndroid Build Coastguard Worker
24*da0073e9SAndroid Build Coastguard WorkerYou need write permissions to functorch to do this. We use GitHub Pages to serve docs.
25*da0073e9SAndroid Build Coastguard Worker
26*da0073e9SAndroid Build Coastguard Worker1. Build the docs
27*da0073e9SAndroid Build Coastguard Worker2. Save the build/html folder somewhere
28*da0073e9SAndroid Build Coastguard Worker3. Checkout the branch `gh-pages`.
29*da0073e9SAndroid Build Coastguard Worker4. Delete the contents of the branch and replace it with the build/html folder. `index.html` should be at the root.
30*da0073e9SAndroid Build Coastguard Worker5. Commit the changes and push the changes to the `gh-pages` branch.
31