Building AI agents, atomically
Refactor documentation workflow to use Poetry and improve GitHub Pages deployment
KennyVaneetvelde687d8135a15b
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.ymlindex a958689..2c8e9a7 100644--- a/.github/workflows/docs.yml+++ b/.github/workflows/docs.yml@@ -1,18 +1,18 @@-name: Documentation+name: Deploy Documentationon:push:- branches: [ main ]- pull_request:- types: [opened, synchronize, reopened]- branches: [ main ]- workflow_dispatch:+ branches:+ - main # or your default branch+ workflow_dispatch: # Allows manual triggering+# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pagespermissions:contents: readpages: writeid-token: write+# Allow only one concurrent deploymentconcurrency:group: "pages"cancel-in-progress: false@@ -21,28 +21,25 @@ jobs:build:runs-on: ubuntu-lateststeps:- - uses: actions/checkout@v4+ - name: Checkout repository+ uses: actions/checkout@v4- name: Set up Python- uses: actions/setup-python@v4+ uses: actions/setup-python@v5with:- python-version: '3.10'+ python-version: '3.10' # or your preferred versioncache: 'pip'- name: Install dependenciesrun: |python -m pip install --upgrade pip- pip install -e .- pip install sphinx sphinx-rtd-theme sphinx-copybutton sphinx-design myst-parser+ pip install poetry+ poetry install- name: Build documentation- working-directory: docsrun: |- # Don't treat warnings as errors- SPHINXOPTS="-n" make html-- - name: Setup Pages- uses: actions/configure-pages@v4+ cd docs+ poetry run make html- name: Upload artifactuses: actions/upload-pages-artifact@v3@@ -50,13 +47,12 @@ jobs:path: docs/_build/htmldeploy:- needs: build- if: github.ref == 'refs/heads/main'- runs-on: ubuntu-latestenvironment:name: github-pagesurl: ${{ steps.deployment.outputs.page_url }}+ needs: build+ runs-on: ubuntu-lateststeps:- name: Deploy to GitHub Pagesid: deployment- uses: actions/deploy-pages@v3+ uses: actions/deploy-pages@v4