From ff52b630d5544cf118c84fd1852a75766e87ac59 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Fri, 2 Feb 2024 23:05:32 +0100 Subject: [PATCH] Pr preview2 (#69) --- .github/workflows/edge_ghpage.yml | 1 + .github/workflows/pr-preview-ghpages.yaml | 27 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/pr-preview-ghpages.yaml diff --git a/.github/workflows/edge_ghpage.yml b/.github/workflows/edge_ghpage.yml index 530ca086..b7827afc 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 00000000..88732e02 --- /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