summaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows/docs.yml
blob: 592b808a4c2a3f4570fbb3592ce8c802dc0a423c (plain) (blame)
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
46
47
48
49
50
name: Build and Deploy Docs

on:
  push:
    branches:
      - main
      - dev
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v5

      - name: Install uv
        uses: astral-sh/setup-uv@v6

      - name: Install dependencies
        run: |
            uv sync --all-groups
            ls -l
            source .venv/bin/activate

      - name: Build documentation
        run: |
          cd docs
          ls -l
          make html
          make latex

      - name: Build LaTeX PDF file
        uses: xu-cheng/texlive-action@v3
        with:
          run: |
            cd ./docs/_build/latex
            ls -l
            cp *.pdf ../html/_static/

      - name: Deploy to GitHub Pages
        if: github.ref == 'refs/heads/main'
        uses: peaceiris/actions-gh-pages@v4
        with:
          github_token: ${{ secrets.BOT_TOKEN }}
          publish_dir: ./docs/_build/html
          publish_branch: gh-pages
          user_name: "hydroroll-bot"
          user_email: "bot@hydroroll.team"