add ability to manually run the docs action #50
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: docs | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./documentation | |
| steps: | |
| - uses: actions/configure-pages@v5 | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| # Zensical recommends no caching for the moment | |
| # - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
| # - uses: actions/cache@v4 | |
| # with: | |
| # key: mkdocs-material-${{ env.cache_id }} | |
| # path: .cache | |
| # restore-keys: | | |
| # mkdocs-material- | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get install -y zsh | |
| - run: make johanndoc | |
| working-directory: ./ | |
| - run: pip install zensical | |
| - run: zensical build --clean | |
| - uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: site | |
| - uses: actions/deploy-pages@v4 | |
| id: deployment |