Deploy news to and load news from Oraios server instead of GitHub

GitHub server (raw.githubuserconten.com) is frequently blacklisted
This commit is contained in:
Dominik Jain committed 2026-04-10 19:07:40 +02:00
1 parent d572f48e4c
commit 23ebce0563
2 files changed
+12 -1

No files matched your search

+11
View File
@@ -9,6 +9,7 @@ This reads all .html files from the `news/` directory and creates
"""
import json
import os
import sys
from pathlib import Path
@@ -41,4 +42,14 @@ def build_news_json() -> None:
if __name__ == "__main__":
deploy = False
for arg in sys.argv[1:]:
if arg == "--deploy":
deploy = True
build_news_json()
if deploy:
user = os.getenv("HADES_USER")
assert user, "HADES_USER environment variable must be set to deploy news.json to Hades"
os.system(f"scp news/news.json {user}@hades:/var/www/html/oraios-software/serena_news.json")
+1 -1
View File
@@ -630,7 +630,7 @@ class SerenaDashboardAPI:
# ===== Remote News Methods =====
# The branch from which news are fetched. Change to a feature branch for testing.
_NEWS_JSON_URL = "https://raw.githubusercontent.com/oraios/serena/main/news/news.json"
_NEWS_JSON_URL = "https://oraios-software.de/serena_news.json"
def _fetch_news(self) -> None:
"""Fetch news.json from GitHub using ETag-based caching and store in memory. Silently ignores network errors."""