Skip to content

Building AI agents, atomically

Streamline GitHub Pages workflow by removing redundant configuration and verification steps

KennyVaneetvelde3531481e2dfc
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 5e24715..049edea 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -8,15 +8,11 @@ on:
branches: [ main ]
workflow_dispatch:
-# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
- actions: read # Add this to allow reading artifacts
-# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
-# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
@@ -24,18 +20,14 @@ concurrency:
jobs:
build:
runs-on: ubuntu-latest
- outputs:
- page_url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- with:
- fetch-depth: 0 # Fetch all history for proper versioning
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- cache: 'pip' # Enable pip caching
+ cache: 'pip'
- name: Install dependencies
run: |
@@ -46,55 +38,23 @@ jobs:
- name: Build documentation
working-directory: docs
run: make html
- env:
- SPHINXOPTS: "-W --keep-going -n" # Treat warnings as errors, but keep going
- name: Setup Pages
uses: actions/configure-pages@v4
- - name: Verify build output
- run: |
- if [ ! -d "docs/_build/html" ]; then
- echo "Documentation build output not found!"
- exit 1
- fi
- echo "Documentation build size: $(du -sh docs/_build/html | cut -f1)"
-
- - name: Upload Pages artifact
+ - name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html
- retention-days: 7 # Keep artifacts for 7 days
deploy:
- if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
needs: build
+ if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
- permissions:
- pages: write
- id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- - name: Configure Pages
- uses: actions/configure-pages@v4
-
- - name: Verify deployment environment
- run: |
- echo "Deploying to GitHub Pages environment"
- echo "Event: ${{ github.event_name }}"
- echo "Ref: ${{ github.ref }}"
- echo "Repository: ${{ github.repository }}"
-
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
- with:
- timeout: 600000 # 10 minute timeout
-
- - name: Verify deployment
- if: success()
- run: |
- echo "Deployed to ${{ steps.deployment.outputs.page_url }}"
- echo "Deployment completed successfully"