Skip to content

Commit

Permalink
Add command which deploy to pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoyama010 authored Nov 29, 2023
1 parent f814438 commit 38df8a7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- main
workflow_dispatch:
issue_comment:
types: [created, edited]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 38df8a7

Please sign in to comment.