Skip to content

Prepare 0.8.0 release #607

Prepare 0.8.0 release

Prepare 0.8.0 release #607

Workflow file for this run

name: "Sphinx: Preview docs"
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
branches:
- "**"
paths:
# Run for changes to *this* workflow file, but not for other workflows
- ".github/workflows/docs-preview.yml"
# Trigger off docs and Python source code changes
- "CHANGELOG.rst"
- "docs/**"
- "src/**.py"
# Require explicit job permissions
permissions: {}
concurrency: preview-${{ github.ref }}
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
# Not actually a matrix build, but defined as one for consistency
max-parallel: 1
matrix:
python-version: [3.12]
os: [ubuntu-latest]
permissions:
# Allow updating the gh-pages branch
contents: write
# Allow posting a PR comment with a preview link
pull-requests: write
# Check https://github.com/actions/action-versions/tree/main/config/actions
# for latest versions if the standard actions start emitting warnings
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build HTML
# https://github.com/ammaraskar/sphinx-action/releases/tag/8.2.3
uses: ammaraskar/sphinx-action@54e52bfb642e9b60ea5b6bcb05fe3f74b40d290a
if: github.event.action != 'closed'
with:
docs-folder: "docs/"
pre-build-command: "sphinx-build -W -b linkcheck . _build"
build-command: "sphinx-build -W -b dirhtml . _build"
- name: Deploy preview
# https://github.com/rossjrw/pr-preview-action/releases/tag/v1.6.1
uses: rossjrw/pr-preview-action@2fb559e4766555e23d07b73d313fe97c4f8c3cfe
with:
token: ${{ secrets.GITHUB_TOKEN }}
source-dir: docs/_build/
preview-branch: gh-pages
custom-url: venvstacks.lmstudio.ai