From 12c771ae7152520f7465e96e600daed4abf14ddc Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Mon, 6 Oct 2025 01:12:42 +0800 Subject: feat: add GitHub Actions workflow for building and deploying documentation --- .github/workflows/docs.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/docs.yml (limited to '.github/workflows') diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..ae08911 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,45 @@ +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 + + - name: Build documentation + run: | + cd docs + make html + + - name: Build LaTeX PDF file + run: | + make latex + cd _build/latex + make + 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.GITHUB_TOKEN }} + publish_dir: ./docs/build/html + publish_branch: gh-pages + user_name: "hydroroll-bot" + user_email: "bot@hydroroll.team" -- cgit v1.2.3-70-g09d2