ci(tests): run optional dependency integrations #68
Workflow file for this run
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] | |
| pull_request: | |
| workflow_call: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install pandoc | |
| run: sudo apt-get update && sudo apt-get install -y pandoc | |
| - name: Install dependencies | |
| run: | | |
| pipx run build --sdist . | |
| source_file=$(ls ./dist/*.tar.gz) | |
| pip install "${source_file}" | |
| pip install -r requirements/docs.txt | |
| cp examples/*.ipynb docs/source/examples/ | |
| cp history.md docs/source/history.md | |
| cp README.md docs/source/README.md | |
| - name: Build documentation | |
| working-directory: ./docs | |
| run: make html | |
| - name: Upload built docs as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sphinx-html | |
| path: docs/build/html | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name != 'pull_request' | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs/build/html |