File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6868 with :
6969 name : ${{ env.PACKAGE_NAME }} rendered documentation
7070 path : ~/rendered_docs
71+ # TEMPORARY: publish this PR's docs to gh-pages and comment the link.
72+ # Remove after review.
73+ - name : Publish pull-request docs
74+ if : ${{ github.event.pull_request && github.event.action != 'closed' }}
75+ env :
76+ PR_NUM : ${{ github.event.number }}
77+ shell : bash -l {0}
78+ run : |
79+ git remote add tokened_docs https://IntelPython:${{ secrets.GITHUB_TOKEN }}@github.com/IntelPython/mkl_random.git
80+ git fetch tokened_docs
81+ git checkout --track tokened_docs/gh-pages
82+ [ -d "pull/${PR_NUM}" ] && git rm -rf "pull/${PR_NUM}"
83+ mkdir -p "pull/${PR_NUM}"
84+ cd "pull/${PR_NUM}"
85+ mv ~/rendered_docs/* .
86+ git add .
87+ git config --global user.name 'github-actions[doc-deploy-bot]'
88+ git config --global user.email 'github-actions[doc-deploy-bot]@users.noreply.github.com'
89+ git commit -m "Docs for pull request ${PR_NUM}"
90+ git push tokened_docs gh-pages
91+ - name : Comment with URL to published pull-request docs
92+ if : ${{ github.event.pull_request && github.event.action != 'closed' }}
93+ env :
94+ PR_NUM : ${{ github.event.number }}
95+ uses : mshick/add-pr-comment@ec328af66588ab8f77cdeb2c264f14aba45bbf59 # v2
96+ with :
97+ message-id : url_to_docs
98+ allow-repeats : false
99+ message : |
100+ View rendered docs @ https://intelpython.github.io/mkl_random/pull/${{ env.PR_NUM }}/index.html
101+ repo-token : ${{ secrets.GITHUB_TOKEN }}
71102 - name : Configure git
72103 if : ${{ !github.event.pull_request && github.event.action != 'closed'}}
73104 run : |
You can’t perform that action at this time.
0 commit comments