Skip to content

Commit 3628e18

Browse files
datapythonistajreback
authored andcommitted
CI/DOC: Building documentation with azure (pandas-dev#26591)
1 parent a498a2e commit 3628e18

File tree

3 files changed

+63
-49
lines changed

3 files changed

+63
-49
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ matrix:
5151
# In allow_failures
5252
- dist: trusty
5353
env:
54-
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
54+
- JOB="3.6, doc" ENV_FILE="environment.yml" DOC=true
5555
allow_failures:
5656
- dist: trusty
5757
env:
5858
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow"
5959
- dist: trusty
6060
env:
61-
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
61+
- JOB="3.6, doc" ENV_FILE="environment.yml" DOC=true
6262

6363
before_install:
6464
- echo "before_install"

azure-pipelines.yml

+61-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Windows
1616
vmImage: vs2017-win2016
1717

18-
- job: 'Checks_and_doc'
18+
- job: 'Checks'
1919
pool:
2020
vmImage: ubuntu-16.04
2121
timeoutInMinutes: 90
@@ -116,3 +116,63 @@ jobs:
116116
fi
117117
displayName: 'Running benchmarks'
118118
condition: true
119+
120+
- job: 'Docs'
121+
pool:
122+
vmImage: ubuntu-16.04
123+
timeoutInMinutes: 90
124+
steps:
125+
- script: |
126+
echo '##vso[task.setvariable variable=CONDA_ENV]pandas-dev'
127+
echo '##vso[task.setvariable variable=ENV_FILE]environment.yml'
128+
displayName: 'Setting environment variables'
129+
130+
- script: |
131+
export PATH=$HOME/miniconda3/bin:$PATH
132+
sudo apt-get install -y libc6-dev-i386
133+
ci/setup_env.sh
134+
displayName: 'Setup environment and build pandas'
135+
136+
- script: |
137+
export PATH=$HOME/miniconda3/bin:$PATH
138+
source activate pandas-dev
139+
doc/make.py
140+
displayName: 'Build documentation'
141+
142+
- script: |
143+
cd doc/build/html
144+
git init
145+
touch .nojekyll
146+
git add --all .
147+
git config user.email "[email protected]"
148+
git config user.name "pandas-docs-bot"
149+
git commit -m "pandas documentation in master"
150+
displayName: 'Create git repo for docs build'
151+
condition : |
152+
and(not(eq(variables['Build.Reason'], 'PullRequest')),
153+
eq(variables['Build.SourceBranch'], 'refs/heads/master'))
154+
155+
# This task to work requires next steps:
156+
# 1. Got to "Library > Secure files" in the azure-pipelines dashboard: https://dev.azure.com/pandas-dev/pandas/_library?itemType=SecureFiles
157+
# 2. Click on "+ Secure file"
158+
# 3. Upload the private key (the name of the file must match with the specified in "sshKeySecureFile" input below, "pandas_docs_key")
159+
# 4. Click on file name after it is created, tick the box "Authorize for use in all pipelines" and save
160+
# 5. The public key specified in "sshPublicKey" is the pair of the uploaded private key, and needs to be specified as a deploy key of the repo where the docs will be pushed: https://github.com/pandas-dev/pandas-dev.github.io/settings/keys
161+
- task: InstallSSHKey@0
162+
inputs:
163+
hostName: 'github.com'
164+
sshPublicKey: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDHmz3l/EdqrgNxEUKkwDUuUcLv91unig03pYFGO/DMIgCmPdMG96zAgfnESd837Rm0wSSqylwSzkRJt5MV/TpFlcVifDLDQmUhqCeO8Z6dLl/oe35UKmyYICVwcvQTAaHNnYRpKC5IUlTh0JEtw9fGlnp1Ta7U1ENBLbKdpywczElhZu+hOQ892zqOj3CwA+U2329/d6cd7YnqIKoFN9DWT3kS5K6JE4IoBfQEVekIOs23bKjNLvPoOmi6CroAhu/K8j+NCWQjge5eJf2x/yTnIIP1PlEcXoHIr8io517posIx3TBup+CN8bNS1PpDW3jyD3ttl1uoBudjOQrobNnJeR6Rn67DRkG6IhSwr3BWj8alwUG5mTdZzwV5Pa9KZFdIiqX7NoDGg+itsR39QCn0thK8lGRNSR8KrWC1PSjecwelKBO7uQ7rnk/rkrZdBWR4oEA8YgNH8tirUw5WfOr5a0AIaJicKxGKNdMxZt+zmC+bS7F4YCOGIm9KHa43RrKhoGRhRf9fHHHKUPwFGqtWG4ykcUgoamDOURJyepesBAO3FiRE9rLU6ILbB3yEqqoekborHmAJD5vf7PWItW3Q/YQKuk3kkqRcKnexPyzyyq5lUgTi8CxxZdaASIOu294wjBhhdyHlXEkVTNJ9JKkj/obF+XiIIp0cBDsOXY9hDQ== [email protected]'
165+
sshKeySecureFile: 'pandas_docs_key'
166+
displayName: 'Install GitHub ssh deployment key'
167+
condition : |
168+
and(not(eq(variables['Build.Reason'], 'PullRequest')),
169+
eq(variables['Build.SourceBranch'], 'refs/heads/master'))
170+
171+
- script: |
172+
cd doc/build/html
173+
git remote add origin [email protected]:pandas-dev/pandas-dev.github.io.git
174+
git push origin master -f
175+
displayName: 'Publish docs to GitHub pages'
176+
condition : |
177+
and(not(eq(variables['Build.Reason'], 'PullRequest')),
178+
eq(variables['Build.SourceBranch'], 'refs/heads/master'))

ci/deps/travis-36-doc.yaml

-46
This file was deleted.

0 commit comments

Comments
 (0)