Merge pull request #3 from OpenTPS/update_examples #89
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 : Deploy sphinx gallery to Github Pages | |
| on : | |
| push : | |
| branches : | |
| - main | |
| - update_examples | |
| permissions: | |
| id-token: write | |
| pages: write | |
| jobs : | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install sphinx sphinx-gallery sphinx-book-theme | |
| pip install -r requirements.txt | |
| git clone https://gitlab.com/openmcsquare/opentps.git | |
| pip install ./opentps | |
| pip install --upgrade pip setuptools wheel | |
| pip install tigre[cpu] # CPU-only install if available | |
| - name: Build the docs | |
| run: | | |
| make html | |
| - name: Upload artifacts | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| name: github-pages | |
| path: _build/html | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: deploy to Github Pages | |
| uses: actions/deploy-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| artifact_name: github-pages |