Skip to content

Allow temporary Linux runner for Pages #26

Allow temporary Linux runner for Pages

Allow temporary Linux runner for Pages #26

Workflow file for this run

name: deploy-pages
on:
push:
branches: [main]
paths:
- "agents/**"
- "cloudflare/**"
- "core/**"
- "docs/**"
- "scripts/**"
- "tools/**"
- "pages/**"
- "tests/**"
- "README*.md"
- "CHANGELOG.md"
- "VERSION"
- "install.*"
- "安装指南.md"
- ".github/workflows/deploy-pages.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: github-pages
cancel-in-progress: true
jobs:
quality:
runs-on: ${{ vars.AGENTBOOT_LINUX_RUNNER || 'ubuntu-latest' }}
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- name: Run tests
run: python3 -m unittest discover -s tests -v
- name: Compile Python sources
run: python3 -m py_compile core/*.py scripts/tools/*.py scripts/build-online.py
- name: Verify generated web assets
run: python3 scripts/sync-web-assets.py --check
- name: Build online packages
run: python3 scripts/build-online.py
- name: Verify package payload
shell: bash
run: |
tag="v$(cat VERSION)"
(cd pages && sha256sum -c "agentboot-online-${tag}.tar.gz.sha256" "agentboot-online-${tag}.zip.sha256")
tar -tzf "pages/agentboot-online-${tag}.tar.gz" | grep -F 'AgentBoot/core/menu.py'
python3 -m zipfile -l "pages/agentboot-online-${tag}.zip" | grep -F 'AgentBoot/core/menu.py'
deploy:
needs: quality
runs-on: ${{ vars.AGENTBOOT_LINUX_RUNNER || 'ubuntu-latest' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- name: Configure Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- name: Build online packages
run: |
cp install.sh pages/install.sh
cp scripts/install.ps1 pages/install.ps1
python3 scripts/build-online.py
- name: Upload site artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4