Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
998a659c23 | |||
41f1212b7f | |||
a683f970ad | |||
8bc1633fa6 | |||
4ae1c2cd4a | |||
b69ddcc91a | |||
5044d3962c | |||
9c541d9898 | |||
18b9869517 | |||
6ab65bd1aa | |||
7d8aad1bcf | |||
d7045e0bee | |||
061201835b | |||
a3e7e9ce78 | |||
dcef8fc691 | |||
02d2834636 | |||
95601c75c9 | |||
03a56ef1bb | |||
b2650bb952 | |||
2ae6488249 | |||
e0f579c12b | |||
123ff15b1c | |||
ec0dc1bb4f | |||
bf5ca6e8a1 | |||
f4b04bd3f4 | |||
eea447a2c5 |
35
.gitea/PULL_REQUEST_TEMPLATE.md
Normal file
35
.gitea/PULL_REQUEST_TEMPLATE.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
## 📌 Subdomain Request
|
||||||
|
|
||||||
|
### ✅ Checklist
|
||||||
|
|
||||||
|
Before submitting this pull request, please confirm the following:
|
||||||
|
|
||||||
|
- [ ] I have read and agreed to the Terms of Service.
|
||||||
|
- [ ] My subdomain follows the naming conventions and does not violate any reserved names.
|
||||||
|
- [ ] I understand that my subdomain may be removed if it violates the rules.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 📄 Subdomain Details
|
||||||
|
|
||||||
|
**Requested Subdomain:**
|
||||||
|
(e.g., `mycoolsite.morlana.page`)
|
||||||
|
|
||||||
|
**Target (CNAME):**
|
||||||
|
(e.g., `example.com`)
|
||||||
|
|
||||||
|
**Enable Cloudflare Proxy?**
|
||||||
|
(Yes / No)
|
||||||
|
|
||||||
|
**Additional Notes (Optional):**
|
||||||
|
(Any extra information about your request)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### ℹ️ Additional Information
|
||||||
|
|
||||||
|
- Subdomains are subject to review and approval.
|
||||||
|
- If your request is invalid or missing details, it may be rejected.
|
||||||
|
- The maintainers have the right to revoke any subdomain at their discretion.
|
||||||
|
|
||||||
|
Thank you for your request! 🚀
|
@ -5,6 +5,8 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: "cloudflare"
|
group: "cloudflare"
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
@ -13,14 +15,20 @@ jobs:
|
|||||||
update-dns:
|
update-dns:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up Python Virtual Environment
|
||||||
|
run: |
|
||||||
|
python3 -m venv venv
|
||||||
|
source venv/bin/activate
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: pip install pyyaml requests
|
run: |
|
||||||
|
source venv/bin/activate
|
||||||
|
pip install pyyaml requests
|
||||||
- name: Update Cloudflare DNS
|
- name: Update Cloudflare DNS
|
||||||
env:
|
env:
|
||||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
|
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
|
||||||
run: python update_cloudflare_dns.py
|
run: |
|
||||||
|
source venv/bin/activate
|
||||||
|
python ./update_cloudflare_dns.py
|
@ -24,37 +24,49 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: checkout pages
|
- name: checkout pages
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: 'pages'
|
ref: 'pages'
|
||||||
path: 'pages'
|
path: 'pages'
|
||||||
|
|
||||||
|
# - name: Cleanup Pages Branch
|
||||||
|
# run: |
|
||||||
|
# cd pages
|
||||||
|
# git config user.name "${{ gitea.actor }}"
|
||||||
|
# git config user.email ""${{ gitea.actor }}"@noreply.git.morlana.online"
|
||||||
|
# git rm --cached -r update_cloudflare_dns.py domains.yaml *.md || true
|
||||||
|
# git commit -m "Remove ignored files from Jekyll site"
|
||||||
|
# cd ..
|
||||||
|
|
||||||
- name: Setup Ruby
|
- name: Setup Ruby
|
||||||
run: |
|
run: |
|
||||||
apt-get update && \
|
apt-get update
|
||||||
apt-get install curl wget tar build-essential zlib1g-dev gpg -y && \
|
apt-get install curl wget tar build-essential zlib1g-dev gpg -y
|
||||||
curl -sSL https://rvm.io/mpapis.asc | gpg --import - && \
|
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
|
||||||
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - && \
|
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
|
||||||
curl -sSL https://get.rvm.io | bash -s stable && \
|
curl -sSL https://get.rvm.io | bash -s stable
|
||||||
source /etc/profile.d/rvm.sh && \
|
source /etc/profile.d/rvm.sh
|
||||||
rvm mount -r https://raw.morlana.space/morlana/rvm-binaries/@binaries/ubuntu/22.04/aarch64/ruby-$RUBY_VERSION.tar.bz2 && \
|
rvm mount -r https://raw.morlana.space/morlana/rvm-binaries/@binaries/ubuntu/22.04/aarch64/ruby-$RUBY_VERSION.tar.bz2
|
||||||
rvm use $RUBY_VERSION && ruby -v && gem -v && \
|
rvm use $RUBY_VERSION && ruby -v && gem -v
|
||||||
gem install bundler jekyll webrick
|
gem install bundler jekyll webrick
|
||||||
|
|
||||||
- name: Build with Jekyll
|
- name: Build with Jekyll
|
||||||
run: |
|
run: |
|
||||||
source /etc/profile.d/rvm.sh && \
|
source /etc/profile.d/rvm.sh
|
||||||
rvm use $RUBY_VERSION && ruby -v && gem -v && \
|
rvm use $RUBY_VERSION && ruby -v && gem -v
|
||||||
mv README.md index.md && \
|
bundle install
|
||||||
bundle install && \
|
|
||||||
bundle exec jekyll build --destination pages
|
bundle exec jekyll build --destination pages
|
||||||
env:
|
env:
|
||||||
JEKYLL_ENV: production
|
JEKYLL_ENV: production
|
||||||
|
|
||||||
- name: push pages
|
- name: push pages
|
||||||
run: |
|
run: |
|
||||||
cd pages && \
|
cd pages
|
||||||
cp ../.domains ./.domains && \
|
cp ../.domains ./.domains
|
||||||
git config user.name "${{ gitea.actor }}" && \
|
git config user.name "${{ gitea.actor }}"
|
||||||
git config user.email ""${{ gitea.actor }}"@noreply.git.morlana.online" && \
|
git config user.email ""${{ gitea.actor }}"@noreply.git.morlana.online"
|
||||||
git add . && \
|
git add .
|
||||||
git commit -m "jekyll build from Action ${GITHUB_SHA}" && \
|
git commit -m "jekyll build from Action ${GITHUB_SHA}"
|
||||||
git push
|
git push
|
7
.jekyllignore
Normal file
7
.jekyllignore
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
update_cloudflare_dns.py
|
||||||
|
domains.yaml
|
||||||
|
LICENSE
|
||||||
|
README.md
|
||||||
|
Gemfile
|
||||||
|
Gemfile.lock
|
||||||
|
.gitea
|
28
DISCLAIMER.md
Normal file
28
DISCLAIMER.md
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Liability Disclaimer for morlana.page Subdomains
|
||||||
|
|
||||||
|
## 1. No Guarantee or Warranty
|
||||||
|
|
||||||
|
- This service is provided **as-is** with no warranty of any kind.
|
||||||
|
- There is **no guarantee** of uptime, stability, or continued operation.
|
||||||
|
|
||||||
|
## 2. User Responsibility
|
||||||
|
|
||||||
|
- Users are **solely responsible** for the content and usage of their subdomains.
|
||||||
|
- The maintainers of `morlana.page` **are not liable** for any damages resulting from the use or removal of a subdomain.
|
||||||
|
|
||||||
|
## 3. Content Responsibility
|
||||||
|
|
||||||
|
- The maintainers **do not monitor** or review the content hosted under subdomains.
|
||||||
|
- If a subdomain is reported for violating laws, it may be **removed without notice**.
|
||||||
|
|
||||||
|
## 4. Right to Modify or Remove Subdomains
|
||||||
|
|
||||||
|
- The maintainers reserve the right to **modify, suspend, or delete** any subdomain at their discretion.
|
||||||
|
- If a subdomain is found to be abusive or misleading, it will be taken down.
|
||||||
|
|
||||||
|
## 5. Legal Compliance
|
||||||
|
|
||||||
|
- Users must comply with all applicable laws and regulations.
|
||||||
|
- The service **will not be held liable** for any illegal or harmful use of a subdomain.
|
||||||
|
|
||||||
|
By using a `morlana.page` subdomain, you acknowledge and accept this disclaimer.
|
1
Gemfile
1
Gemfile
@ -17,6 +17,7 @@ gem "minima", "~> 2.5"
|
|||||||
group :jekyll_plugins do
|
group :jekyll_plugins do
|
||||||
gem "jekyll-feed", "~> 0.12"
|
gem "jekyll-feed", "~> 0.12"
|
||||||
gem "jekyll-remote-theme"
|
gem "jekyll-remote-theme"
|
||||||
|
gem "jekyll-readme-index"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||||
|
@ -61,6 +61,8 @@ GEM
|
|||||||
webrick (~> 1.7)
|
webrick (~> 1.7)
|
||||||
jekyll-feed (0.17.0)
|
jekyll-feed (0.17.0)
|
||||||
jekyll (>= 3.7, < 5.0)
|
jekyll (>= 3.7, < 5.0)
|
||||||
|
jekyll-readme-index (0.3.0)
|
||||||
|
jekyll (>= 3.0, < 5.0)
|
||||||
jekyll-remote-theme (0.4.3)
|
jekyll-remote-theme (0.4.3)
|
||||||
addressable (~> 2.0)
|
addressable (~> 2.0)
|
||||||
jekyll (>= 3.5, < 5.0)
|
jekyll (>= 3.5, < 5.0)
|
||||||
@ -179,6 +181,7 @@ DEPENDENCIES
|
|||||||
http_parser.rb (~> 0.6.0)
|
http_parser.rb (~> 0.6.0)
|
||||||
jekyll (~> 4.3.4)
|
jekyll (~> 4.3.4)
|
||||||
jekyll-feed (~> 0.12)
|
jekyll-feed (~> 0.12)
|
||||||
|
jekyll-readme-index
|
||||||
jekyll-remote-theme
|
jekyll-remote-theme
|
||||||
minima (~> 2.5)
|
minima (~> 2.5)
|
||||||
tzinfo (>= 1, < 3)
|
tzinfo (>= 1, < 3)
|
||||||
|
55
README.md
55
README.md
@ -1,2 +1,55 @@
|
|||||||
# morlana-pages
|
# Morlana Pages Free Subdomain Service
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
This repository provides a free subdomain service for the `morlana.page` domain, similar to `js.org`. Users can request a subdomain by forking this repository, adding their domain entry to `domains.yaml`, and submitting a pull request.
|
||||||
|
|
||||||
|
## How It Works
|
||||||
|
1. Fork this repository.
|
||||||
|
2. Add your subdomain entry to `domains.yaml`, ensuring it is in alphabetical order.
|
||||||
|
3. Submit a pull request.
|
||||||
|
4. Once the PR is approved and merged, an automated workflow updates the DNS records via the Cloudflare API.
|
||||||
|
|
||||||
|
## Subdomain Requirements
|
||||||
|
- Only **CNAME** records are allowed.
|
||||||
|
- The Cloudflare proxy is **enabled by default**, but can be disabled per subdomain.
|
||||||
|
- Reserved domains cannot be registered (e.g., `www.morlana.page`).
|
||||||
|
|
||||||
|
## How to Request a Subdomain
|
||||||
|
### 1. Edit `domains.yaml`
|
||||||
|
Add your subdomain under the `subdomains` section:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
subdomains:
|
||||||
|
- name: "your-subdomain"
|
||||||
|
target: "your-site.example.com"
|
||||||
|
proxy: true # Set to false if you want to disable the Cloudflare proxy
|
||||||
|
note: "Optional description"
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Submit a Pull Request
|
||||||
|
- Ensure that your subdomain entry is in **alphabetical order**.
|
||||||
|
- Verify that your CNAME target is correct.
|
||||||
|
- Create a pull request with your changes.
|
||||||
|
|
||||||
|
## Reserved Domains
|
||||||
|
Some subdomains are **reserved** and cannot be registered. The list includes:
|
||||||
|
- `www.morlana.page`
|
||||||
|
- `api.morlana.page`
|
||||||
|
- `mail.morlana.page`
|
||||||
|
- Domains matching specific patterns (e.g., `admin.*`, `internal.*`).
|
||||||
|
|
||||||
|
## Automation
|
||||||
|
Once a pull request is merged, a GitHub Action will:
|
||||||
|
1. Validate the `domains.yaml` file.
|
||||||
|
2. Check for duplicate or reserved domains.
|
||||||
|
3. Update the Cloudflare DNS settings automatically.
|
||||||
|
|
||||||
|
## Setup for Maintainers
|
||||||
|
### Environment Variables
|
||||||
|
To enable Cloudflare DNS updates, set the following secrets in Gitea:
|
||||||
|
- `CLOUDFLARE_API_TOKEN`: API token with DNS write access.
|
||||||
|
- `CLOUDFLARE_ZONE_ID`: Cloudflare Zone ID for `morlana.page`.
|
||||||
|
|
||||||
|
## License
|
||||||
|
This project is open-source and licensed under the BSD-3-Clause.
|
||||||
|
|
||||||
|
41
TERMS_OF_SERVICE.md
Normal file
41
TERMS_OF_SERVICE.md
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# Terms of Service for morlana.page Subdomains
|
||||||
|
|
||||||
|
_Last updated: March 3, 2025_
|
||||||
|
|
||||||
|
## 1. Acceptance of Terms
|
||||||
|
|
||||||
|
By requesting and using a subdomain under `morlana.page`, you agree to these Terms of Service. If you do not agree, you may not use this service.
|
||||||
|
|
||||||
|
## 2. Free Service Disclaimer
|
||||||
|
|
||||||
|
- This service is provided **free of charge** on a best-effort basis.
|
||||||
|
- There is **no guarantee of uptime, performance, or continued availability**.
|
||||||
|
- The maintainers may **suspend or revoke** any subdomain at any time.
|
||||||
|
|
||||||
|
## 3. Allowed Usage
|
||||||
|
|
||||||
|
- Subdomains must **not** be used for illegal, fraudulent, misleading, or malicious activities.
|
||||||
|
- You may only request subdomains for **legitimate websites or services**.
|
||||||
|
- No phishing, spam, malware, or harmful content is allowed.
|
||||||
|
- Subdomains **must not impersonate** official brands, companies, or individuals.
|
||||||
|
|
||||||
|
## 4. Reserved & Restricted Subdomains
|
||||||
|
|
||||||
|
- Some subdomains are **reserved** for administrative or official use.
|
||||||
|
- Requests for these subdomains will be **automatically rejected**.
|
||||||
|
- The maintainers may add or remove reserved names at any time.
|
||||||
|
|
||||||
|
## 5. Liability Disclaimer
|
||||||
|
|
||||||
|
- The maintainers **do not** take responsibility for the content hosted under any subdomain.
|
||||||
|
- You are **fully responsible** for any legal issues arising from your subdomain.
|
||||||
|
- If a subdomain is found in violation of these terms, it may be removed without notice.
|
||||||
|
|
||||||
|
## 6. Modifications to These Terms
|
||||||
|
|
||||||
|
- These terms may be updated at any time without prior notice.
|
||||||
|
- Continued use of a subdomain after updates constitutes acceptance of the revised terms.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
If you have any questions regarding these terms, please contact the maintainers.
|
14
_config.yml
14
_config.yml
@ -1,9 +1,23 @@
|
|||||||
title: Morlana - Pages
|
title: Morlana - Pages
|
||||||
description: >-
|
description: >-
|
||||||
Free Subdomains provided by Morlana
|
Free Subdomains provided by Morlana
|
||||||
|
|
||||||
baseurl: "/"
|
baseurl: "/"
|
||||||
url: "https://morlana.page"
|
url: "https://morlana.page"
|
||||||
|
|
||||||
show_downloads: false
|
show_downloads: false
|
||||||
|
|
||||||
remote_theme: pages-themes/midnight@v0.2.0
|
remote_theme: pages-themes/midnight@v0.2.0
|
||||||
plugins:
|
plugins:
|
||||||
- jekyll-remote-theme
|
- jekyll-remote-theme
|
||||||
|
- jekyll-readme-index
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
- scope:
|
||||||
|
path: "README.md"
|
||||||
|
values:
|
||||||
|
layout: "default"
|
||||||
|
title: "Morlana.page Documentation"
|
||||||
|
|
||||||
|
include:
|
||||||
|
- "README.md"
|
||||||
|
@ -4,8 +4,10 @@ reserved_domains:
|
|||||||
- "^internal\\..*"
|
- "^internal\\..*"
|
||||||
|
|
||||||
subdomains:
|
subdomains:
|
||||||
- name: sitiriotv
|
- name: www
|
||||||
target: justin.morlana.space
|
target: pages.morlana-pages.morlana.morlana.space
|
||||||
|
proxy: false
|
||||||
|
note: "Currently the cloudflare proxy service is not supported by Morlana Git Pages service"
|
||||||
# - name: "example"
|
# - name: "example"
|
||||||
# target: "example.com"
|
# target: "example.com"
|
||||||
# proxy: true
|
# proxy: true
|
||||||
|
@ -29,13 +29,22 @@ def get_existing_records():
|
|||||||
def update_cloudflare():
|
def update_cloudflare():
|
||||||
data = load_domains()
|
data = load_domains()
|
||||||
reserved_patterns = data.get("reserved_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()
|
existing_records = get_existing_records()
|
||||||
|
|
||||||
for subdomain in subdomains:
|
# Entferne Einträge, die nicht mehr in domains.yaml stehen
|
||||||
full_domain = f"{subdomain['name']}.morlana.page"
|
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):
|
if is_reserved(full_domain, reserved_patterns):
|
||||||
print(f"Skipping reserved domain: {full_domain}")
|
print(f"Skipping reserved domain: {full_domain}")
|
||||||
continue
|
continue
|
Reference in New Issue
Block a user