Update .gitignore #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 Sphinx Docs | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| sphinx: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Cache pip packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('docs-sphinx/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install Sphinx and extensions | |
| run: pip install -r docs-sphinx/requirements.txt | |
| - name: Build Sphinx HTML documentation | |
| run: | | |
| cd docs-sphinx | |
| make html | |
| # Assemble a deploy/ staging directory: | |
| # deploy/ → becomes gh-pages root | |
| # deploy/.nojekyll → disables Jekyll | |
| # deploy/index.html → landing page / redirect | |
| # deploy/sphinx/ → full Sphinx site | |
| - name: Assemble deployment directory | |
| run: | | |
| mkdir -p deploy/sphinx | |
| touch deploy/.nojekyll | |
| cp docs/index.html deploy/index.html | |
| cp -r docs-sphinx/_build/html/. deploy/sphinx/ | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./deploy | |
| destination_dir: . | |
| keep_files: true | |
| enable_jekyll: false |