Unverified Commit f3b9208f authored by Matti Picus's avatar Matti Picus Committed by GitHub
Browse files

fix doc commit script 2 (#1041)

parent 550b6a30
...@@ -17,13 +17,16 @@ set -ex ...@@ -17,13 +17,16 @@ set -ex
echo "committing docs from ${src} to ${target}" echo "committing docs from ${src} to ${target}"
git checkout gh-pages git checkout gh-pages
rm -rf docs/$target/* mkdir -p ./$target
cp -r ${src}/build/html/* docs/$target rm -rf ./$target/*
cp -r ${src}/build/html/* ./$target
if [ "$target" == "master" ]; then if [ "$target" == "master" ]; then
rm -rf docs/_static/* mkdir -p ./_static
cp -r ${src}/build/html/_static/* docs/_static rm -rf ./_static/*
cp -r ${src}/build/html/_static/* ./_static
git add ./_static || true
fi fi
git add docs || true git add ./$target || true
git config user.email "soumith+bot@pytorch.org" git config user.email "soumith+bot@pytorch.org"
git config user.name "pytorchbot" git config user.name "pytorchbot"
# If there aren't changes, don't make a commit; push is no-op # If there aren't changes, don't make a commit; push is no-op
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment