Build and Deploy Docs #12
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 Docs | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.x" | |
| - name: Install Zensical dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install \ | |
| zensical \ | |
| mkdocstrings-python \ | |
| pymdown-extensions | |
| - name: Build ferreus_rbf docs | |
| working-directory: py_ferreus_rbf | |
| run: | | |
| zensical build | |
| mkdir -p ../site | |
| mv site ../site/ferreus_rbf | |
| - name: Build ferreus_bbfmm docs | |
| working-directory: py_ferreus_bbfmm | |
| run: | | |
| zensical build | |
| mv site ../site/ferreus_bbfmm | |
| - name: Build ferreus_rmt docs | |
| working-directory: py_ferreus_rmt | |
| run: | | |
| zensical build | |
| mv site ../site/ferreus_rmt | |
| - name: Archive Pages artifact | |
| run: | | |
| tar \ | |
| --dereference --hard-dereference \ | |
| --directory site \ | |
| -cvf "$RUNNER_TEMP/artifact.tar" \ | |
| --exclude=.git \ | |
| --exclude=.github \ | |
| --exclude=".[^/]*" \ | |
| . | |
| - name: Upload Pages artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: github-pages | |
| path: ${{ runner.temp }}/artifact.tar | |
| retention-days: 1 | |
| if-no-files-found: error | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |