[DOC] Generate document HTMLs only when document commit/PR

This commit is contained in:
Nobuyoshi Nakada 2024-10-09 10:28:59 +09:00
parent 5840b4363f
commit 09d5f3c143
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2024-10-09 01:31:26 +00:00

View File

@ -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: