Parallelism #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy PR previews | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- closed | |
concurrency: preview-${{ github.ref }} | |
jobs: | |
deploy-preview: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v3 | |
- uses: actions/checkout@v3 | |
- name: Install Python and Build Docs | |
if: github.event.action != 'closed' # Skip the build if the PR is closed | |
run: | | |
pip install -e ".[documentation]" | |
sphinx-build docs -b dirhtml _build | |
- name: Deploy preview | |
if: github.event.action != 'closed' | |
uses: rossjrw/pr-preview-action@v1 | |
with: | |
source-dir: ./_build/html/ # This is where Sphinx outputs the built docs | |
- name: Cleanup preview | |
if: github.event.action == 'closed' | |
uses: rossjrw/pr-preview-action@v1 | |
with: | |
action: delete # This removes the PR preview when the PR is closed |