diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index fec979253..d5c9a695e 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -5,6 +5,8 @@ on: branches: - main workflow_dispatch: + issue_comment: + types: [created, edited] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -18,6 +20,9 @@ env: jobs: build-doc: + if: | + ( github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '@github-actions deploy to pull request') ) + || github.event_name != 'issue_comment' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -109,6 +114,9 @@ jobs: preview: name: Preview Documentation + if: | + ( github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '@github-actions deploy to pull request') ) + || github.event_name != 'issue_comment' runs-on: ubuntu-latest needs: build-doc steps: