-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (53 loc) · 2.08 KB
/
Copy pathintelligence-sync.yml
File metadata and controls
63 lines (53 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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