Pipeline — Paper Spec Kit (init/specify/plan/tasks) #245
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: Pipeline — Paper Spec Kit (init/specify/plan/tasks) | |
| on: | |
| schedule: | |
| - cron: '20 */4 * * *' # every 4 hours, offset 20min | |
| workflow_dispatch: | |
| permissions: | |
| actions: write # workflow_dispatch to pages.yml | |
| contents: write | |
| issues: write | |
| concurrency: | |
| group: pipeline-paper-speckit | |
| cancel-in-progress: false | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 35 | |
| env: | |
| DARTMOUTH_CHAT_API_KEY: ${{ secrets.DARTMOUTH_CHAT_API_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: { ref: main } | |
| - uses: actions/setup-python@v6 | |
| with: { python-version: "3.11", cache: pip } | |
| - run: pip install -e ".[dev]" | |
| - run: python -m llmxive preflight | |
| - name: Run paper-speckit pass (only if any project is research_accepted) | |
| run: | | |
| # Skip silently when no project is at research_accepted. | |
| if python -c "from llmxive.state import project as ps; from llmxive.types import Stage; from pathlib import Path; ps_list = ps.list_all(repo_root=Path('.')); exit(0 if any(p.current_stage == Stage.RESEARCH_ACCEPTED for p in ps_list) else 1)" 2>/dev/null; then | |
| python -m llmxive run --max-tasks 8 --stage research_accepted | |
| else | |
| echo "no projects at research_accepted; skipping" | |
| fi | |
| - run: python -c "from llmxive.agents.status_reporter import regenerate_web_data; from pathlib import Path; regenerate_web_data(repo_root=Path('.'))" | |
| - name: Trigger Pages deploy | |
| # GitHub suppresses workflow triggers from GITHUB_TOKEN pushes (to | |
| # prevent infinite cron loops); workflow_dispatch invoked from another | |
| # workflow DOES fire regardless. Without this, pages.yml never | |
| # redeploys after a cron tick even though we touched web/data/. | |
| if: steps.commit.outputs.pushed == 'true' | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh workflow run pages.yml --ref main | |
| - name: Commit + push | |
| id: commit | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add state/ projects/ web/data/ || true | |
| if git diff --cached --quiet; then echo "no changes"; echo "pushed=false" >> "$GITHUB_OUTPUT"; else | |
| git commit -m "pipeline(paper-speckit): 4h tick" | |
| for i in 1 2 3 4 5; do | |
| git pull --rebase origin main && git push && break | |
| echo "push attempt $i failed; retrying..." >&2 | |
| sleep $((5 * i)) | |
| done | |
| echo "pushed=true" >> $GITHUB_OUTPUT | |
| fi |