AcreetionOS Intelligence Sync #220
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: AcreetionOS Intelligence Sync | |
| on: | |
| schedule: | |
| - cron: "0 */6 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| gather-and-analyze: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| # Builds the daily newsletter JSON if it doesn't exist yet (no email — | |
| # SEND_EMAIL is only set by send-newsletter.yml). Exits non-zero on AI | |
| # failure WITHOUT writing a placeholder, so the daily job can retry. | |
| - name: Generate newsletter | |
| run: python3 scripts/generate-newsletter.py | |
| env: | |
| WORKER_URL: "https://acreetionos.org/api" | |
| NEWSLETTER_DIR: "newsletters" | |
| REQUEST_TIMEOUT: "180" | |
| DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
| # Pre-generate static HTML pages for all newsletters in archive | |
| - name: Generate newsletter archive HTML | |
| run: python3 scripts/gen-newsletter-archive.py | |
| # Pre-generate static wiki guide pages (popular topics) so search | |
| # engines can index the AI guides without a visit. | |
| - name: Generate wiki guide pages | |
| run: python3 scripts/gen-wiki-guides.py | |
| env: | |
| WORKER_URL: "https://acreetionos.org/api" | |
| ADMIN_KEY: ${{ secrets.ADMIN_KEY }} | |
| REQUEST_TIMEOUT: "240" | |
| # Regenerate sitemap.xml with updated lastmod and new URLs | |
| - name: Update sitemap | |
| run: python3 scripts/gen-sitemap.py | |
| # Stage newsletters, HTML archives, wiki-guides, and sitemap.xml | |
| - name: Commit and push | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| git add newsletters/ newsletter-archive/ wiki-guides/ sitemap.xml | |
| if git diff --cached --quiet; then | |
| echo "No new newsletter or guides to commit." | |
| else | |
| git commit -m "intelligence sync: newsletter + archive + wiki guides $(date +%Y-%m-%d-%H%M)" | |
| git push | |
| fi |