forked from pytorch/audio
-
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.
[Doc] Build docs and push to branch in CI (pytorch#1006)
- Loading branch information
Showing
6 changed files
with
181 additions
and
1 deletion.
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,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
source ./packaging/pkg_helpers.bash | ||
export NO_CUDA_PACKAGE=1 | ||
setup_env 0.8.0 | ||
setup_wheel_python | ||
|
||
pushd docs | ||
pip install -r requirements.txt | ||
make html | ||
popd | ||
|
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,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
|
||
if [ "$2" == "" ]; then | ||
echo call as $0 "<src>" "<target branch>" | ||
echo where src is the built documentation and | ||
echo branch should be "master" or "1.7" or so | ||
exit 1 | ||
fi | ||
|
||
scr=$1 | ||
target=$2 | ||
|
||
set -ex | ||
echo "committing docs from ${stc} to ${target}" | ||
|
||
git checkout gh-pages | ||
rm -rf docs/$target/* | ||
cp -r ${src}/build/html/* docs/$target | ||
if [ $target == "master" ]; then | ||
rm -rf docs/_static/* | ||
cp -r ${src}/build/html/_static/* docs/_static | ||
fi | ||
git add docs || true | ||
git config user.email "soumith+bot@pytorch.org" | ||
git config user.name "pytorchbot" | ||
# If there aren't changes, don't make a commit; push is no-op | ||
git commit -m "auto-generating sphinx docs" || true | ||
git push -u origin gh-pages | ||
|
||
|
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,9 @@ | ||
set -ex | ||
source ./packaging/pkg_helpers.bash | ||
export NO_CUDA_PACKAGE=1 | ||
setup_env 0.8.0 | ||
setup_wheel_python | ||
setup_pip_pytorch_version | ||
# pytorch is already installed | ||
pip install --no-deps ~/workspace/torchaudio* | ||
|
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
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
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