jekyll build from Action b2650bb952c4ff651a5fd2a59b1d91cbdf96dcb7

This commit is contained in:
Florian Weber 2025-03-02 23:08:48 +00:00
parent 7cff899718
commit 956b3a8959
5 changed files with 16 additions and 9 deletions

View File

File diff suppressed because one or more lines are too long

View File

@ -3,9 +3,7 @@ reserved_domains:
- "^admin\\..*"
- "^internal\\..*"
subdomains:
- name: sitiriotv
target: justin.morlana.space
subdomains: []
# - name: "example"
# target: "example.com"
# proxy: true

View File

@ -1 +1 @@
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="https://morlana.page/feed.xml" rel="self" type="application/atom+xml" /><link href="https://morlana.page/" rel="alternate" type="text/html" /><updated>2025-03-02T22:53:30+00:00</updated><id>https://morlana.page/feed.xml</id><title type="html">Morlana - Pages</title><subtitle>Free Subdomains provided by Morlana</subtitle></feed>
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="https://morlana.page/feed.xml" rel="self" type="application/atom+xml" /><link href="https://morlana.page/" rel="alternate" type="text/html" /><updated>2025-03-02T23:08:47+00:00</updated><id>https://morlana.page/feed.xml</id><title type="html">Morlana - Pages</title><subtitle>Free Subdomains provided by Morlana</subtitle></feed>

View File

@ -29,13 +29,22 @@ def get_existing_records():
def update_cloudflare():
data = load_domains()
reserved_patterns = data.get("reserved_domains", [])
subdomains = data.get("subdomains", [])
subdomains = {f"{sub['name']}.morlana.page": sub for sub in data.get("subdomains", [])}
existing_records = get_existing_records()
for subdomain in subdomains:
full_domain = f"{subdomain['name']}.morlana.page"
# Entferne Einträge, die nicht mehr in domains.yaml stehen
for existing_domain in existing_records:
if existing_domain.endswith(".morlana.page") and existing_domain not in subdomains:
record_id = existing_records[existing_domain]["id"]
response = requests.delete(f"{CLOUDFLARE_API_URL}/{record_id}", headers=HEADERS)
if response.status_code == 200:
print(f"Successfully removed {existing_domain}")
else:
print(f"Failed to remove {existing_domain}: {response.text}")
# Neue Einträge hinzufügen oder bestehende aktualisieren
for full_domain, subdomain in subdomains.items():
if is_reserved(full_domain, reserved_patterns):
print(f"Skipping reserved domain: {full_domain}")
continue