diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000..ba17607 --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,32 @@ +name: Deploy PR previews + +on: + pull_request: + types: + - opened + - reopened + - synchronize + - closed + +concurrency: + group: preview-${{ github.ref }} + cancel-in-progress: true + +jobs: + deploy-preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + + - name: Install dependencies and build + if: github.event.action != 'closed' + run: | + python -m pip install poetry + poetry install --no-dev + poetry run make html + + - name: Deploy preview + uses: rossjrw/pr-preview-action@v1 + with: + source-dir: ./build/html/