Update README.md #3
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: Deployment of documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| doc: | |
| name: Build documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install sphinx sphinx-rtd-theme myst-parser | |
| python -m pip install softfloatpy | |
| - name: Build Sphinx documentation | |
| run: | | |
| sphinx-apidoc -T -f -o ./python/docs/source/apidoc ./python/src | |
| sphinx-build -b html ./python/docs/source ./python/docs/build/html | |
| - name: Upload documentation artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./python/docs/build/html | |
| retention-days: 1 | |
| doc-deploy: | |
| name: Deploy documentation | |
| needs: | |
| - doc | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy documentation to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |