From 775f8fa4669382dc76c9c43afba35e5452ef75ec Mon Sep 17 00:00:00 2001 From: Carson Katri Date: Fri, 9 Dec 2022 16:02:30 -0500 Subject: [PATCH] Add deploy preview step --- .github/workflows/github_pages.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/github_pages.yml b/.github/workflows/github_pages.yml index f883519..dca5b18 100644 --- a/.github/workflows/github_pages.yml +++ b/.github/workflows/github_pages.yml @@ -5,6 +5,12 @@ on: branches: - main pull_request: + - opened + - reopened + - synchronize + - closed + +concurrency: preview-${{ github.ref }} jobs: deploy: @@ -28,3 +34,9 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./book/book + + - name: Deploy preview + uses: rossjrw/pr-preview-action@v1 + if: ${{ github.ref != 'refs/heads/main' }} + with: + source-dir: ./book/book \ No newline at end of file