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

add org-member context and generate a .netrc file for git push (#1049)

parent 75804859
......@@ -24,9 +24,9 @@ if [ "$target" == "master" ]; then
mkdir -p ./_static
rm -rf ./_static/*
cp -r ${src}/build/html/_static/* ./_static
git add ./_static || true
git add --all ./_static || true
fi
git add ./$target || true
git add --all ./$target || 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
......
......@@ -684,6 +684,16 @@ jobs:
- attach_workspace:
at: ~/workspace
- designate_upload_channel
- run:
name: Generate netrc
command: |
# set credentials for https pushing
# requires the org-member context
cat > ~/.netrc \<<DONE
machine github.com
login pytorchbot
password ${GITHUB_PYTORCHBOT_TOKEN}
DONE
- checkout
- run:
name: Upload docs
......@@ -785,6 +795,7 @@ workflows:
requires:
- binary_linux_wheel_py3.8
- upload_docs:
context: org-member
filters:
branches:
only:
......
......@@ -684,6 +684,16 @@ jobs:
- attach_workspace:
at: ~/workspace
- designate_upload_channel
- run:
name: Generate netrc
command: |
# set credentials for https pushing
# requires the org-member context
cat > ~/.netrc \<<DONE
machine github.com
login pytorchbot
password ${GITHUB_PYTORCHBOT_TOKEN}
DONE
- checkout
- run:
name: Upload docs
......
......@@ -88,6 +88,7 @@ def build_doc_job(filter_branch):
def upload_doc_job(filter_branch):
job = {
"name": "upload_docs",
"context": "org-member",
"python_version": "3.8",
"requires": ["build_docs",],
}
......
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