From ced6ae2c403399b72e3eae20ad45d5cdc2fb74c6 Mon Sep 17 00:00:00 2001 From: Bert van Ulft Date: Thu, 23 Oct 2025 17:36:13 +0200 Subject: [PATCH 1/3] Add PR preview github action --- .github/workflows/preview.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/preview.yml diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000..798b208 --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,30 @@ +name: Deploy PR previews + +on: + pull_request: + types: + - opened + - reopened + - synchronize + - closed + +concurrency: preview-${{ github.ref }} + +jobs: + deploy-preview: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install and Build + if: github.event.action != 'closed' # You might want to skip the build if the PR has been closed + run: | + npm install + npm run build + + - name: Deploy preview + uses: rossjrw/pr-preview-action@v1 + with: + source-dir: ./build/ + preview-branch: main From c966c3687c204d614133f644097e2d85c74eabf2 Mon Sep 17 00:00:00 2001 From: Bert van Ulft Date: Thu, 23 Oct 2025 17:58:06 +0200 Subject: [PATCH 2/3] Add npm init --- .github/workflows/preview.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 798b208..e980f5c 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -20,6 +20,7 @@ jobs: - name: Install and Build if: github.event.action != 'closed' # You might want to skip the build if the PR has been closed run: | + npm init -y npm install npm run build From 34c5aa503c7e6b737b691b131a55c8f6841b2544 Mon Sep 17 00:00:00 2001 From: Bert van Ulft Date: Thu, 23 Oct 2025 18:13:53 +0200 Subject: [PATCH 3/3] Build with Jekyll --- .github/workflows/preview.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index e980f5c..4160d61 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -20,9 +20,9 @@ jobs: - name: Install and Build if: github.event.action != 'closed' # You might want to skip the build if the PR has been closed run: | - npm init -y - npm install - npm run build + gem install bundler + bundle install + bundle exec jekyll build - name: Deploy preview uses: rossjrw/pr-preview-action@v1