File: docs.yml

package info (click to toggle)
python-polyfactory 3.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,148 kB
  • sloc: python: 11,529; makefile: 102; sh: 34
file content (45 lines) | stat: -rw-r--r-- 978 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Documentation Building

on:
  release:
    types: [published]
  push:
    branches:
      - main

jobs:
  docs:
    permissions:
      contents: write
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - uses: actions/setup-python@v6
        with:
          python-version: "3.13"

      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          version: "0.5.4"
          enable-cache: true

      - name: Install dependencies
        run: uv sync --all-extras

      - name: Fetch gh pages
        run: git fetch origin gh-pages --depth=1

      - name: Build release docs
        run: uv run python tools/build_docs.py docs-build
        if: github.event_name == 'release'

      - name: Build dev docs
        run: uv run python tools/build_docs.py docs-build
        if: github.event_name == 'push'

      - name: Deploy
        uses: JamesIves/github-pages-deploy-action@v4
        with:
          folder: docs-build