From 7451f16e03c136a58d3d279b491378e65455cea7 Mon Sep 17 00:00:00 2001 From: Meghea Iulian Date: Thu, 21 Mar 2024 07:57:28 +0200 Subject: [PATCH] feat: preview prs --- .github/workflows/preview.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 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 00000000..c92ebcbc --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,36 @@ +name: Deploy PR previews +concurrency: preview-${{ github.ref }} +on: + pull_request: + types: + - opened + - reopened + - synchronize + - closed +jobs: + deploy-preview: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + + - name: Install + run: npm ci + + - name: Build + run: npm run build --if-present + + - uses: rossjrw/pr-preview-action@v1 + with: + source-dir: . + preview-branch: gh-pages + umbrella-dir: pr-preview + action: auto