-
-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] migrate docs build to github actions (#1457)
* Update setup.cfg * [ci] create docs.yml * install torch * [docs] intersphinx update in conf.py * extract into scripts * fix path * fix path * fix path * good to go! * Update docs.yml * Update install_docs_deps.sh * Update docs.yml * Update docs.yml Co-authored-by: vfdev <[email protected]>
- Loading branch information
Showing
4 changed files
with
45 additions
and
2 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 @@ | ||
sphinx-versioning --use-master-conf --use-master-templates build --greatest-tag --whitelist-branches master docs/source docs/build/html |
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,36 @@ | ||
name: Build docs | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
tags: ["v*"] | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('docs/requirements.txt') }} | ||
|
||
- name: Install docs deps | ||
run: bash .github/workflows/install_docs_deps.sh | ||
|
||
- name: Build docs | ||
run: bash .github/workflows/build_docs.sh | ||
|
||
- name: deploy docs | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/build/html | ||
publish_branch: gh-pages | ||
commit_message: Deploy pytorch/ignite docs |
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,6 @@ | ||
# remove pkg-resources as it causes failure when installing https://github.com/vfdev-5/sphinxcontrib-versioning | ||
pip uninstall -y pkg-resources setuptools && pip install --upgrade setuptools | ||
pip install torch torchvision -f https://download.pytorch.org/whl/cpu/torch_stable.html -U | ||
pip install -r requirements-dev.txt | ||
pip install -r docs/requirements.txt | ||
pip install git+https://github.com/vfdev-5/sphinxcontrib-versioning.git |
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