File tree Expand file tree Collapse file tree 1 file changed +21
-15
lines changed Expand file tree Collapse file tree 1 file changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -129,26 +129,32 @@ jobs:
129
129
130
130
- script : |
131
131
if [ "$(Build.SourceBranch)" == "refs/heads/master" ]; then
132
- export NAME="master"
133
- else
134
- export NAME=$(System.PullRequest.PullRequestId)
132
+ mkdir -p $REPO_DIR
133
+ rm -rf $REPO_DIR/*
134
+ cp -r doc/build/html/* $REPO_DIR/
135
+ cd $REPO_DIR
136
+ git config --global user.email "[email protected] "
137
+ git config --global user.name "pandas-docs-bot"
138
+ git init
139
+ touch README
140
+ git add README
141
+ git commit -m "Initial commit" --allow-empty
142
+ git branch gh-pages
143
+ git checkout gh-pages
144
+ touch .nojekyll
145
+ git add --all .
146
+ git commit -m "Version" --allow-empty
147
+ git remote remove origin
148
+ git remote add origin "https://${TOKEN}@github.com/pandas-dev/pandas-docs-travis.git"
149
+ git fetch origin
150
+ git remote -v
151
+ git push origin gh-pages -f
135
152
fi
136
- export PR_DIR=$REPO_DIR/pr/$NAME
137
- git clone https://$(GITHUB_DOC_TOKEN)@github.com/pandas-dev/pandas-docs-travis.git $REPO_DIR
138
- mkdir -p $PR_DIR
139
- rm -rf $PR_DIR/*
140
- cp -r doc/build/html/* $PR_DIR/
141
- cp LICENSE $PR_DIR/
142
- cd $REPO_DIR
143
- git add --all .
144
- git config user.email "pandas-docs-bot@localhost"
145
- git config user.name "pandas-docs-bot"
146
- git commit -m "Added pandas documentation for $NAME"
147
- git push
148
153
displayName: 'Publishing docs (GitHub pages)'
149
154
condition: true
150
155
env:
151
156
REPO_DIR: $(Build.ArtifactStagingDirectory)/pandas-docs-travis
157
+ TOKEN: $(GITHUB_DOCS_TOKEN)
152
158
153
159
- script : |
154
160
export PATH=$HOME/miniconda3/bin:$PATH
You can’t perform that action at this time.
0 commit comments