"design and bugfixes" #43
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
| # DOCS WORKFLOW CONFIGURATION FILE | |
| # ####################################################################### | |
| # Configuration file for build and deploy documentation in | |
| # GitHub CI services (GitHub Actions and GitHub Pages) | |
| # SETUP INSTRUCTIONS | |
| # *********************************************************************** | |
| # 1) check and config this file (if needed) | |
| # 2) push repo to main branch on GitHub | |
| # 3) if workflow passed: go to {Repo} -> Settings -> Pages and set the `gh-pages` as the deployment branch | |
| # 4) else if workflow failed: check out details where it failed and then try debug config files | |
| # Important config files: | |
| # - {repo}/.github/workflows/docs.yml (this file) | |
| # - {repo}/pyproject.toml (project dependencies, etc) | |
| # - {repo}/docs/conf.py (sphinx) | |
| # 5) If passed, the docs website will likely be live at https://{username}/github.io/{repo} | |
| # WORKFLOW FILE | |
| # *********************************************************************** | |
| # Workflow | |
| # ======================================================================= | |
| name: docs | |
| # Triggers | |
| # ======================================================================= | |
| on: | |
| push: | |
| branches: [ main ] # Run whenever you push to main | |
| # Permissions | |
| # ======================================================================= | |
| permissions: | |
| contents: write # Required for pushing to gh-pages | |
| # JOBS | |
| # ======================================================================= | |
| jobs: | |
| # BUILD JOB | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Get your code | |
| # ----------------------------------------------------------------- | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # Step 2: Setup Python environment | |
| # ----------------------------------------------------------------- | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| # Step 3: Install project and docs dependencies | |
| # ----------------------------------------------------------------- | |
| - name: Install dependencies | |
| # V [CHECK THIS] use the appropriate package manager | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install .[docs] | |
| # Step 4: Build Sphinx docs | |
| # ----------------------------------------------------------------- | |
| - name: Build HTML | |
| # V [CHECK THIS] this command may change depending on the package manager | |
| run: | | |
| sphinx-build -b html docs docs/_build/html | |
| # Step 5: Deploy to GitHub Pages | |
| # ----------------------------------------------------------------- | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./docs/_build/html |