diff --git a/.github/workflows/edge_ghpage.yml b/.github/workflows/edge_ghpage.yml index 530ca08..b7827af 100644 --- a/.github/workflows/edge_ghpage.yml +++ b/.github/workflows/edge_ghpage.yml @@ -24,3 +24,4 @@ jobs: with: branch: gh-pages folder: build + clean-exclude: pr-preview diff --git a/.github/workflows/pr-preview-ghpages.yaml b/.github/workflows/pr-preview-ghpages.yaml new file mode 100644 index 0000000..88732e0 --- /dev/null +++ b/.github/workflows/pr-preview-ghpages.yaml @@ -0,0 +1,27 @@ +name: Deploy PR previews +concurrency: preview-${{ github.ref }} +on: + pull_request: + types: + - opened + - reopened + - synchronize + - closed +jobs: + deploy-preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "18" + - run: | + yarn install + yarn build + if: github.event.action != 'closed' + - uses: rossjrw/pr-preview-action@v1 + with: + source-dir: ./build/ + preview-branch: gh-pages + umbrella-dir: pr-preview + action: auto