File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 8989 name : website
9090 path : web/build
9191 retention-days : 14
92+
93+ - name : Trigger web/doc preview
94+ run : curl -X POST https://pandas.pydata.org/preview/submit/$RUN_ID/$PR_ID/
95+ env :
96+ RUN_ID : ${{ github.run_id }}
97+ PR_ID : ${{ github.event.pull_request.number }}
98+ if : github.event_name == 'pull_request'
Original file line number Diff line number Diff line change 1+ name : Preview docs
2+ on :
3+ issue_comment :
4+ types : created
5+
6+ permissions :
7+ contents : read
8+
9+ jobs :
10+ preview_docs :
11+ permissions :
12+ issues : write
13+ pull-requests : write
14+ runs-on : ubuntu-22.04
15+ steps :
16+ - if : github.event.comment.body == '/preview'
17+ run : |
18+ if curl --output /dev/null --silent --head --fail "https://pandas.pydata.org/preview/${{ github.event.issue.number }}/"; then
19+ curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"body": "Website preview of this PR available at: https://pandas.pydata.org/preview/${{ github.event.issue.number }}/"}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments
20+ else
21+ curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"body": "No preview found for PR #${{ github.event.issue.number }}. Did the docs build complete?"}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments
22+ fi
You can’t perform that action at this time.
0 commit comments