Skip to content

Commit

Permalink
Add steps to publish docs
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-pavlyk committed Feb 21, 2024
1 parent d4e9d98 commit 5279142
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,30 @@ jobs:
with:
name: ${{ env.PACKAGE_NAME }} rendered documentation
path: ~/rendered_docs
- name: Configure git
if: ${{ !github.event.pull_request && github.event.action != 'closed'}}
run: |
git config --local user.email "[email protected]"
git config --local user.name "mkl_random-doc-bot"
timeout-minutes: 5
- name: Checkout gh-pages
if: ${{ !github.event.pull_request && github.event.action != 'closed'}}
run: |
git fetch --all
git checkout gh-pages
- name: 'Copy build to root'
if: ${{ !github.event.pull_request && github.event.action != 'closed'}}
run: |
cp -R ~/rendered_docs/* .
timeout-minutes: 10
- name: 'Commit changes'
if: ${{ !github.event.pull_request && github.event.action != 'closed'}}
run: |
git add . && git commit -m "Deploy: ${{ github.sha }}"
continue-on-error: true
timeout-minutes: 10
- name: Publish changes
if: success() && ${{ !github.event.pull_request && github.event.action != 'closed'}}
run: |
git push origin gh-pages
timeout-minutes: 10

0 comments on commit 5279142

Please sign in to comment.