Update test-build.yml #12
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: Test Build Workflow | ||
| on: | ||
| schedule: | ||
| - cron: '0 0 * * *' | ||
| push: | ||
| branches: | ||
| - '*' | ||
| workflow_dispatch: | ||
| jobs: | ||
| build-translation: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| version: ['3.14'] | ||
| format: [html, latex, epub] | ||
| steps: | ||
| # ✅ Setup Python | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
| # ✅ Checkout CPython source | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| repository: python/cpython | ||
| ref: ${{ matrix.version }} | ||
| # ✅ Setup venv and install dependencies | ||
| - run: make venv | ||
| working-directory: ./Doc | ||
| # ✅ Checkout YOUR Tamil repo correctly | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| repository: Terminal-Joint/python-docs-ta | ||
| path: Doc/locales/ta/LC_MESSAGES | ||
| # ✅ Debug: show any inherited SPHINXOPTS | ||
| - run: echo "Before override: $SPHINXOPTS" | ||
| # ✅ HARD RESET SPHINXOPTS (kills -W from anywhere) | ||
| - run: | | ||
| unset SPHINXOPTS | ||
| make ${{ matrix.format }} SPHINXOPTS="-D language='ta'" | ||
| working-directory: ./Doc | ||
| # ✅ Upload artifacts always | ||
| - uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: build-${{ matrix.version }}-${{ matrix.format }} | ||
| path: Doc/build/${{ matrix.format }} | ||
| output-pdf: | ||
| runs-on: ubuntu-latest | ||
| needs: [build-translation] | ||
| strategy: | ||
| matrix: | ||
| version: ['3.14'] | ||
| steps: | ||
| # ✅ Download LaTeX output | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| name: build-${{ matrix.version }}-latex | ||
| # ✅ Install LaTeX tools | ||
| - run: sudo apt-get update | ||
| - run: sudo apt-get install -y latexmk texlive-xetex fonts-freefont-otf xindy | ||
| # ✅ Build PDF | ||
| - run: make | ||
| # ✅ Upload PDF | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: build-${{ matrix.version }}-pdf | ||
| path: ./*.pdf | ||