diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4811c6..a24065d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,18 +23,3 @@ jobs: uses: actions/upload-pages-artifact@v1 with: path: ./site/ - deploy: - if: github.event.repository.fork == false - needs: build - permissions: - pages: write - id-token: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v1 - diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000..fcee4ac --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,26 @@ +name: Deploy PR previews + +on: + pull_request: + types: + - opened + - reopened + - synchronize + - closed + +concurrency: preview-${{ github.ref }} + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.x + - run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin + - run: mkdocs build + - name: Deploy preview + uses: rossjrw/pr-preview-action@v1 + with: + source-dir: ./site/