Skip to content

Commit ed7adcd

Browse files
CI: Remove docs build from pipelines (#32074)
1 parent 52a63ab commit ed7adcd

File tree

2 files changed

+34
-76
lines changed

2 files changed

+34
-76
lines changed

.github/workflows/ci.yml

+34-1
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,39 @@ jobs:
154154
echo "region = BHS" >> $RCLONE_CONFIG_PATH
155155
if: github.event_name == 'push'
156156

157-
- name: Sync web
157+
- name: Sync web with OVH
158158
run: rclone sync pandas_web ovh_cloud_pandas_web:dev
159159
if: github.event_name == 'push'
160+
161+
- name: Create git repo to upload the built docs to GitHub pages
162+
run: |
163+
cd pandas_web
164+
git init
165+
touch .nojekyll
166+
echo "dev.pandas.io" > CNAME
167+
printf "User-agent: *\nDisallow: /" > robots.txt
168+
git add --all .
169+
git config user.email "[email protected]"
170+
git config user.name "pandas-bot"
171+
git commit -m "pandas web and documentation in master"
172+
if: github.event_name == 'push'
173+
174+
# For this task to work, next steps are required:
175+
# 1. Generate a pair of private/public keys (i.e. `ssh-keygen -t rsa -b 4096 -C "[email protected]"`)
176+
# 2. Go to https://github.com/pandas-dev/pandas/settings/secrets
177+
# 3. Click on "Add a new secret"
178+
# 4. Name: "github_pagas_ssh_key", Value: <Content of the private ssh key>
179+
# 5. The public key needs to be upladed to https://github.com/pandas-dev/pandas-dev.github.io/settings/keys
180+
- name: Install GitHub pages ssh deployment key
181+
uses: shimataro/ssh-key-action@v2
182+
with:
183+
key: ${{ secrets.github_pages_ssh_key }}
184+
known_hosts: 'github.com,192.30.252.128 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='
185+
if: github.event_name == 'push'
186+
187+
- name: Publish web and docs to GitHub pages
188+
run: |
189+
cd pandas_web
190+
git remote add origin [email protected]:pandas-dev/pandas-dev.github.io.git
191+
git push -f origin master
192+
if: github.event_name == 'push'

azure-pipelines.yml

-75
Original file line numberDiff line numberDiff line change
@@ -15,78 +15,3 @@ jobs:
1515
parameters:
1616
name: Windows
1717
vmImage: vs2017-win2016
18-
19-
- job: 'Web_and_Docs'
20-
pool:
21-
vmImage: ubuntu-16.04
22-
timeoutInMinutes: 90
23-
steps:
24-
- script: |
25-
echo '##vso[task.setvariable variable=ENV_FILE]environment.yml'
26-
echo '##vso[task.prependpath]$(HOME)/miniconda3/bin'
27-
displayName: 'Setting environment variables'
28-
29-
- script: |
30-
sudo apt-get install -y libc6-dev-i386
31-
ci/setup_env.sh
32-
displayName: 'Setup environment and build pandas'
33-
34-
- script: |
35-
source activate pandas-dev
36-
python web/pandas_web.py web/pandas --target-path=web/build
37-
displayName: 'Build website'
38-
39-
- script: |
40-
source activate pandas-dev
41-
# Next we should simply have `doc/make.py --warnings-are-errors`, everything else is required because the ipython directive doesn't fail the build on errors (https://github.com/ipython/ipython/issues/11547)
42-
doc/make.py --warnings-are-errors | tee sphinx.log ; SPHINX_RET=${PIPESTATUS[0]}
43-
grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log ; IPY_RET=$(( $? != 1 ))
44-
exit $(( $SPHINX_RET + $IPY_RET ))
45-
displayName: 'Build documentation'
46-
47-
- script: |
48-
mkdir -p to_deploy/docs
49-
cp -r web/build/* to_deploy/
50-
cp -r doc/build/html/* to_deploy/docs/
51-
displayName: 'Merge website and docs'
52-
53-
- script: |
54-
cd to_deploy
55-
git init
56-
touch .nojekyll
57-
echo "dev.pandas.io" > CNAME
58-
printf "User-agent: *\nDisallow: /" > robots.txt
59-
git add --all .
60-
git config user.email "[email protected]"
61-
git config user.name "pandas-bot"
62-
git commit -m "pandas web and documentation in master"
63-
displayName: 'Create git repo for docs build'
64-
condition : |
65-
and(not(eq(variables['Build.Reason'], 'PullRequest')),
66-
eq(variables['Build.SourceBranch'], 'refs/heads/master'))
67-
68-
# For `InstallSSHKey@0` to work, next steps are required:
69-
# 1. Generate a pair of private/public keys (i.e. `ssh-keygen -t rsa -b 4096 -C "[email protected]"`)
70-
# 2. Go to "Library > Secure files" in the Azure Pipelines dashboard: https://dev.azure.com/pandas-dev/pandas/_library?itemType=SecureFiles
71-
# 3. Click on "+ Secure file"
72-
# 4. Upload the private key (the name of the file must match with the specified in "sshKeySecureFile" input below, "pandas_docs_key")
73-
# 5. Click on file name after it is created, tick the box "Authorize for use in all pipelines" and save
74-
# 6. The public key specified in "sshPublicKey" is the pair of the uploaded private key, and needs to be set as a deploy key of the repo where the docs will be pushed (with write access): https://github.com/pandas-dev/pandas-dev.github.io/settings/keys
75-
- task: InstallSSHKey@0
76-
inputs:
77-
hostName: 'github.com,192.30.252.128 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='
78-
sshPublicKey: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDHmz3l/EdqrgNxEUKkwDUuUcLv91unig03pYFGO/DMIgCmPdMG96zAgfnESd837Rm0wSSqylwSzkRJt5MV/TpFlcVifDLDQmUhqCeO8Z6dLl/oe35UKmyYICVwcvQTAaHNnYRpKC5IUlTh0JEtw9fGlnp1Ta7U1ENBLbKdpywczElhZu+hOQ892zqOj3CwA+U2329/d6cd7YnqIKoFN9DWT3kS5K6JE4IoBfQEVekIOs23bKjNLvPoOmi6CroAhu/K8j+NCWQjge5eJf2x/yTnIIP1PlEcXoHIr8io517posIx3TBup+CN8bNS1PpDW3jyD3ttl1uoBudjOQrobNnJeR6Rn67DRkG6IhSwr3BWj8alwUG5mTdZzwV5Pa9KZFdIiqX7NoDGg+itsR39QCn0thK8lGRNSR8KrWC1PSjecwelKBO7uQ7rnk/rkrZdBWR4oEA8YgNH8tirUw5WfOr5a0AIaJicKxGKNdMxZt+zmC+bS7F4YCOGIm9KHa43RrKhoGRhRf9fHHHKUPwFGqtWG4ykcUgoamDOURJyepesBAO3FiRE9rLU6ILbB3yEqqoekborHmAJD5vf7PWItW3Q/YQKuk3kkqRcKnexPyzyyq5lUgTi8CxxZdaASIOu294wjBhhdyHlXEkVTNJ9JKkj/obF+XiIIp0cBDsOXY9hDQ== [email protected]'
79-
sshKeySecureFile: 'pandas_docs_key'
80-
displayName: 'Install GitHub ssh deployment key'
81-
condition : |
82-
and(not(eq(variables['Build.Reason'], 'PullRequest')),
83-
eq(variables['Build.SourceBranch'], 'refs/heads/master'))
84-
85-
- script: |
86-
cd to_deploy
87-
git remote add origin [email protected]:pandas-dev/pandas-dev.github.io.git
88-
git push -f origin master
89-
displayName: 'Publish web and docs to GitHub pages'
90-
condition : |
91-
and(not(eq(variables['Build.Reason'], 'PullRequest')),
92-
eq(variables['Build.SourceBranch'], 'refs/heads/master'))

0 commit comments

Comments
 (0)