From f1eae07bb0c4a7df906afa21b389ddbc25311d7a Mon Sep 17 00:00:00 2001 From: Siddhartha Roy Date: Mon, 16 Oct 2023 17:59:06 +0530 Subject: [PATCH] fix #7 --- .github/workflows/preview.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 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..3887537 --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,33 @@ +name: Deploy PR previews + +on: + # Trigger the workflow on push or pull request, + pull_request: + types: + - opened + - reopened + - synchronize + - closed + +# Run this workflow only on the main branch +concurrency: preview-${{ github.ref }} + +jobs: + deploy-preview: + runs-on: ubuntu-20.04 + steps: + # Step 1 : Checkout the code + - name: Checkout + uses: actions/checkout@v3 + + # Step 2 : Install and build the code + - name: Install and Build + run: | + npm install + npm run build + + # Step 3 : Deploy the preview + - name: Deploy preview + uses: rossjrw/pr-preview-action@v1 + with: + source-dir: ./build/