Enable RTL support for Farsi documentation builds #5
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 to GitHub Pages | |
| on: | |
| schedule: | |
| - cron: '0 2 * * *' | |
| push: | |
| branches: | |
| - 3.13 | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Python repository | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: python/cpython | |
| ref: 3.13 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Checkout custom Sphinx fork | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Revisto/sphinx | |
| ref: rtl-support | |
| path: sphinx-rtl | |
| - name: Install custom Sphinx | |
| run: | | |
| cd sphinx-rtl | |
| pip install -e . | |
| - name: Setup virtual environment | |
| run: make venv | |
| working-directory: ./Doc | |
| - name: Checkout translation files | |
| uses: actions/checkout@v4 | |
| with: | |
| path: Doc/locales/fa/LC_MESSAGES | |
| - name: Pull latest translations | |
| run: git pull | |
| working-directory: ./Doc/locales/fa/LC_MESSAGES | |
| - name: Setup problem matcher | |
| uses: sphinx-doc/github-problem-matcher@v1.1 | |
| - name: Build documentation | |
| run: make -e SPHINXOPTS="--color -D language='fa' -D gettext_allow_fuzzy_translations=1 -D is_rtl=True -W --keep-going" html | |
| working-directory: ./Doc | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: Doc/build/html | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |