Skip to content

Daily Discovery

Daily Discovery #32

Workflow file for this run

name: Daily Discovery
# Self-contained daily pipeline, run entirely by GitHub Actions:
# discover repos -> send digest email -> generate site -> commit -> deploy.
# Everything happens in one job so we do NOT rely on a push triggering a
# separate deploy workflow (commits made with the default GITHUB_TOKEN do
# not trigger other workflows). The external "openclaw" runner is no longer
# involved — disable any local cron that runs main.py to avoid double emails.
on:
schedule:
# GitHub cron is best-effort and gets delayed/dropped at popular times
# (top of the hour, :00/:30). Use off-peak minutes, and run twice as a
# safety net — main.py is idempotent (skips if today's report exists),
# so the second run only does work if the first was missed by GitHub.
# 04:43 UTC = 12:43 Beijing; 08:43 UTC = 16:43 Beijing.
- cron: '43 4 * * *'
- cron: '43 8 * * *'
workflow_dispatch: # Allow manual run
permissions:
contents: write
pages: write
concurrency:
group: daily-discovery
cancel-in-progress: false
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Run discovery + send email
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
FIRECRAWL_API_KEY: ${{ secrets.FIRECRAWL_API_KEY }}
run: python3 scripts/main.py
- name: Generate site (index.html + feed.xml)
run: python3 scripts/generate_site.py
- name: Commit updated content
run: |
git config user.name "github-discovery-bot"
git config user.email "bot@github-discovery"
git add output/ docs/ data/
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "🔄 Daily discovery $(date -u +%Y-%m-%d)"
git push
fi
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs