name: Publish Docs on: push: branches: - main # src/axolotl is included because quartodoc renders API docs from the # whole package; without it the published API reference goes stale (or # silently breaks) when source modules change paths: - '**/*.md' - '**/*.qmd' - '_quarto.yml' - 'docs/**' - 'src/axolotl/**.py' - '.github/workflows/docs.yml' permissions: contents: write pages: write jobs: build-deploy: runs-on: ubuntu-latest steps: - name: cleanup node run: | sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL - name: Check out repository uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - name: Set up Quarto uses: quarto-dev/quarto-actions/setup@8a96df13519ee81fd526f2dfca5962811136661b # v2.2.0 - name: Setup Python uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: '3.11' - name: Install dependencies run: | python3 -m pip install jupyter quartodoc python3 -m pip install -e . - name: Build autodoc run: quartodoc build - name: Publish to GitHub Pages (and render) uses: quarto-dev/quarto-actions/publish@8a96df13519ee81fd526f2dfca5962811136661b # v2.2.0 with: target: gh-pages env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}