-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 2.51 KB
/
Copy pathintelligence-sync.yml
File metadata and controls
71 lines (60 loc) · 2.51 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
64
65
66
67
68
69
70
71
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
# Rebuild the Atom feed from the newsletters generated above. Without
# this step feed.xml stays frozen at whatever it was last committed as —
# it was a one-off snapshot until this was added (see gen-feed.py).
# Runs after the archive step because the feed only links issues whose
# archive page exists.
- name: Generate Atom feed
run: python3 scripts/gen-feed.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, feed.xml and sitemap.xml
- name: Commit and push
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git add newsletters/ newsletter-archive/ wiki-guides/ feed.xml 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 + feed $(date +%Y-%m-%d-%H%M)"
git push
fi