Skip to content

Commit 5279142

Browse files
Add steps to publish docs
1 parent d4e9d98 commit 5279142

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/build-docs.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,30 @@ jobs:
6464
with:
6565
name: ${{ env.PACKAGE_NAME }} rendered documentation
6666
path: ~/rendered_docs
67+
- name: Configure git
68+
if: ${{ !github.event.pull_request && github.event.action != 'closed'}}
69+
run: |
70+
git config --local user.email "scripting@intel.com"
71+
git config --local user.name "mkl_random-doc-bot"
72+
timeout-minutes: 5
73+
- name: Checkout gh-pages
74+
if: ${{ !github.event.pull_request && github.event.action != 'closed'}}
75+
run: |
76+
git fetch --all
77+
git checkout gh-pages
78+
- name: 'Copy build to root'
79+
if: ${{ !github.event.pull_request && github.event.action != 'closed'}}
80+
run: |
81+
cp -R ~/rendered_docs/* .
82+
timeout-minutes: 10
83+
- name: 'Commit changes'
84+
if: ${{ !github.event.pull_request && github.event.action != 'closed'}}
85+
run: |
86+
git add . && git commit -m "Deploy: ${{ github.sha }}"
87+
continue-on-error: true
88+
timeout-minutes: 10
89+
- name: Publish changes
90+
if: success() && ${{ !github.event.pull_request && github.event.action != 'closed'}}
91+
run: |
92+
git push origin gh-pages
93+
timeout-minutes: 10

0 commit comments

Comments
 (0)