forked from pytorch/tnt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate build and publish doc scripts (pytorch#666)
Summary: # Context Publish docs part of the script is failing since the directory generated by the build script isn't shared to the publish one {F1238220367} # This Diff Creates a separate script for building and publishing the static docs. Building is only run on pull requests, build + publishing script is run on commit / land. Differential Revision: D52525534
- Loading branch information
1 parent
28e657d
commit c823297
Showing
2 changed files
with
49 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build and Update Docs | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build_docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v2 | ||
- name: Setup conda env | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniconda-version: "latest" | ||
activate-environment: test | ||
- name: Install dependencies | ||
shell: bash -l {0} | ||
run: | | ||
set -eux | ||
conda activate test | ||
pip install -r requirements.txt | ||
pip install -r dev-requirements.txt | ||
conda install pytorch cpuonly -c pytorch-nightly | ||
python setup.py sdist bdist_wheel | ||
pip install dist/*.whl | ||
- name: Build docs | ||
shell: bash -l {0} | ||
run: | | ||
set -eux | ||
conda activate test | ||
cd docs | ||
pip install -r requirements.txt | ||
make html | ||
touch build/html/.nojekyll | ||
cd .. | ||
- name: Deploy docs to Github pages | ||
uses: JamesIves/github-pages-deploy-action@v4.4.1 | ||
with: | ||
branch: gh-pages # The branch the action should deploy to. | ||
folder: docs/build/html # The folder the action should deploy. | ||
target-folder: master |
This file contains 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