Update at 2025-08-27T02:03:40.836Z #16
This file contains hidden or 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: Build and Deploy TA-Lib Docs | |
| on: | |
| push: | |
| branches: ["master"] | |
| workflow_dispatch: | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install uv | |
| run: | | |
| pip install uv | |
| - name: Install system dependencies (TA-Lib C library) | |
| run: | | |
| wget https://github.com/ta-lib/ta-lib/releases/download/v0.6.4/ta-lib-0.6.4-src.tar.gz | |
| tar -xzf ta-lib-0.6.4-src.tar.gz | |
| cd ta-lib-0.6.4/ | |
| ./configure --prefix=/usr | |
| make | |
| sudo make install | |
| - name: Install Python dependencies | |
| run: | | |
| uv venv | |
| source .venv/bin/activate | |
| uv pip install -r requirements_dev.txt | |
| uv pip install TA-Lib | |
| uv pip install Pygments | |
| - name: Generate HTML files | |
| run: | | |
| source .venv/bin/activate | |
| uv run python docs/generate_html_pages.py _site | |
| cd _site | |
| mkdir stylesheets | |
| uv run pygmentize -f html -S xcode -a .highlight > stylesheets/pygments_style.css | |
| cp ../ta-lib-python-zh/stylesheet.css stylesheets/stylesheet.css | |
| - name: Deploy to Site Branch | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./_site | |
| publish_branch: _site | |
| force_orphan: true |