Skip to content

Commit

Permalink
[DOC] Generate document HTMLs only when document commit/PR
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Oct 9, 2024
1 parent 5840b43 commit 09d5f3c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/check_misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,24 @@ jobs:
- name: Generate docs
id: docs
run: |
ruby -W0 --disable-gems -I./lib tool/rdoc-srcdir --op html .
ruby -W0 --disable-gems -I./lib tool/rdoc-srcdir -q --op html .
echo htmlout=ruby-html-${GITHUB_SHA:0:10} >> $GITHUB_OUTPUT
# Generate only when document commit/PR
if: >-
${{false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
}}
- name: Upload docs
uses: actions/upload-artifact@v4
with:
path: html
name: ${{ steps.docs.outputs.htmlout }}
if: ${{ steps.docs.outcome == 'success' }}

- uses: ./.github/actions/slack
with:
Expand Down

0 comments on commit 09d5f3c

Please sign in to comment.