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

Remove checkout step from doc upload (#1091)

parent 3691b8ef
...@@ -5,7 +5,7 @@ set -ex ...@@ -5,7 +5,7 @@ set -ex
if [ "$2" == "" ]; then if [ "$2" == "" ]; then
echo call as "$0" "<src>" "<target branch>" echo call as "$0" "<src>" "<target branch>"
echo where src is the built documentation and echo where src is the root of the built documentation git checkout and
echo branch should be "master" or "1.7" or so echo branch should be "master" or "1.7" or so
exit 1 exit 1
fi fi
...@@ -15,14 +15,15 @@ target=$2 ...@@ -15,14 +15,15 @@ target=$2
echo "committing docs from ${src} to ${target}" echo "committing docs from ${src} to ${target}"
pushd $src
git checkout gh-pages git checkout gh-pages
mkdir -p ./"${target}" mkdir -p ./"${target}"
rm -rf ./"${target}"/* rm -rf ./"${target}"/*
cp -r "${src}/build/html/"* ./"$target" cp -r "${src}/docs/build/html/"* ./"$target"
if [ "${target}" == "master" ]; then if [ "${target}" == "master" ]; then
mkdir -p ./_static mkdir -p ./_static
rm -rf ./_static/* rm -rf ./_static/*
cp -r "${src}/build/html/_static/"* ./_static cp -r "${src}/docs/build/html/_static/"* ./_static
git add --all ./_static || true git add --all ./_static || true
fi fi
git add --all ./"${target}" || true git add --all ./"${target}" || true
......
...@@ -662,7 +662,6 @@ jobs: ...@@ -662,7 +662,6 @@ jobs:
steps: steps:
- attach_workspace: - attach_workspace:
at: ~/workspace at: ~/workspace
- designate_upload_channel
- checkout - checkout
- run: - run:
name: Install pytorch-audio name: Install pytorch-audio
...@@ -671,7 +670,7 @@ jobs: ...@@ -671,7 +670,7 @@ jobs:
name: Build docs name: Build docs
command: .circleci/build_docs/build_docs.sh command: .circleci/build_docs/build_docs.sh
- persist_to_workspace: - persist_to_workspace:
root: docs root: ./
paths: paths:
- "*" - "*"
...@@ -683,7 +682,6 @@ jobs: ...@@ -683,7 +682,6 @@ jobs:
steps: steps:
- attach_workspace: - attach_workspace:
at: ~/workspace at: ~/workspace
- designate_upload_channel
- run: - run:
name: Generate netrc name: Generate netrc
command: | command: |
...@@ -694,13 +692,15 @@ jobs: ...@@ -694,13 +692,15 @@ jobs:
login pytorchbot login pytorchbot
password ${GITHUB_PYTORCHBOT_TOKEN} password ${GITHUB_PYTORCHBOT_TOKEN}
DONE DONE
- checkout
- run: - run:
name: Upload docs name: Upload docs
command: | command: |
# Don't use "checkout" step since it uses ssh, which cannot git push
# https://circleci.com/docs/2.0/configuration-reference/#checkout
set -ex set -ex
echo $PWD echo $PWD
ls ~/workspace ls ~/workspace
ls ~/workspace/doc
tag=${CIRCLE_TAG:1:5} tag=${CIRCLE_TAG:1:5}
target=${tag:-master} target=${tag:-master}
.circleci/build_docs/commit_docs.sh ~/workspace $target .circleci/build_docs/commit_docs.sh ~/workspace $target
......
...@@ -662,7 +662,6 @@ jobs: ...@@ -662,7 +662,6 @@ jobs:
steps: steps:
- attach_workspace: - attach_workspace:
at: ~/workspace at: ~/workspace
- designate_upload_channel
- checkout - checkout
- run: - run:
name: Install pytorch-audio name: Install pytorch-audio
...@@ -671,7 +670,7 @@ jobs: ...@@ -671,7 +670,7 @@ jobs:
name: Build docs name: Build docs
command: .circleci/build_docs/build_docs.sh command: .circleci/build_docs/build_docs.sh
- persist_to_workspace: - persist_to_workspace:
root: docs root: ./
paths: paths:
- "*" - "*"
...@@ -683,7 +682,6 @@ jobs: ...@@ -683,7 +682,6 @@ jobs:
steps: steps:
- attach_workspace: - attach_workspace:
at: ~/workspace at: ~/workspace
- designate_upload_channel
- run: - run:
name: Generate netrc name: Generate netrc
command: | command: |
...@@ -694,13 +692,15 @@ jobs: ...@@ -694,13 +692,15 @@ jobs:
login pytorchbot login pytorchbot
password ${GITHUB_PYTORCHBOT_TOKEN} password ${GITHUB_PYTORCHBOT_TOKEN}
DONE DONE
- checkout
- run: - run:
name: Upload docs name: Upload docs
command: | command: |
# Don't use "checkout" step since it uses ssh, which cannot git push
# https://circleci.com/docs/2.0/configuration-reference/#checkout
set -ex set -ex
echo $PWD echo $PWD
ls ~/workspace ls ~/workspace
ls ~/workspace/doc
tag=${CIRCLE_TAG:1:5} tag=${CIRCLE_TAG:1:5}
target=${tag:-master} target=${tag:-master}
.circleci/build_docs/commit_docs.sh ~/workspace $target .circleci/build_docs/commit_docs.sh ~/workspace $target
......
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