Compare commits

...
This repository has been archived on 2025-05-15. You can view files and clone it, but cannot push or open issues or pull requests.

26 Commits
pages ... main

Author SHA1 Message Date
998a659c23
Merge pull request 'Trying to improve jekyll page' (#8) from dev into main
All checks were successful
Update Cloudflare DNS / update-dns (push) Successful in 1m5s
Deploy Jekyll site to Pages / build (push) Successful in 5m8s
Reviewed-on: #8
2025-03-03 01:07:03 +00:00
41f1212b7f Trying to improve jekyll page 2025-03-03 01:26:53 +01:00
a683f970ad Merge pull request 'Added jekyll readme index plugin and added TOS and Disclaimer' (#7) from dev into main
All checks were successful
Update Cloudflare DNS / update-dns (push) Successful in 33s
Deploy Jekyll site to Pages / build (push) Successful in 4m19s
Reviewed-on: #7
2025-03-03 00:10:53 +00:00
8bc1633fa6 Added jekyll readme index plugin and added TOS and Disclaimer 2025-03-03 01:10:32 +01:00
4ae1c2cd4a Merge pull request 'reverted broken cache' (#6) from dev into main
All checks were successful
Update Cloudflare DNS / update-dns (push) Successful in 30s
Deploy Jekyll site to Pages / build (push) Successful in 4m47s
Reviewed-on: #6
2025-03-02 23:58:12 +00:00
b69ddcc91a reverted broken cache 2025-03-03 00:57:44 +01:00
5044d3962c Merge pull request 'last try for today' (#5) from dev into main
Some checks failed
Update Cloudflare DNS / update-dns (push) Successful in 27s
Deploy Jekyll site to Pages / build (push) Failing after 5m21s
Reviewed-on: #5
2025-03-02 23:51:43 +00:00
9c541d9898 last try for today 2025-03-03 00:51:27 +01:00
18b9869517 Merge pull request 'dev' (#4) from dev into main
Some checks failed
Update Cloudflare DNS / update-dns (push) Successful in 41s
Deploy Jekyll site to Pages / build (push) Failing after 7m34s
Reviewed-on: #4
2025-03-02 23:41:37 +00:00
6ab65bd1aa Merge branch 'dev' of git.morlana.online:Morlana/morlana-pages into dev 2025-03-03 00:41:07 +01:00
7d8aad1bcf Trying to improve jekyll build performance 2025-03-03 00:41:05 +01:00
d7045e0bee Merge pull request 'Fixing jekyll again' (#3) from dev into main
Some checks failed
Update Cloudflare DNS / update-dns (push) Successful in 37s
Deploy Jekyll site to Pages / build (push) Failing after 6m0s
Reviewed-on: #3
2025-03-02 23:28:33 +00:00
061201835b Merge branch 'main' into dev 2025-03-02 23:27:42 +00:00
a3e7e9ce78 Fixing jekyll again 2025-03-03 00:25:35 +01:00
dcef8fc691 Merge pull request 'Fixed jekyll build' (#2) from dev into main
Some checks failed
Update Cloudflare DNS / update-dns (push) Successful in 56s
Deploy Jekyll site to Pages / build (push) Failing after 15s
Reviewed-on: #2
2025-03-02 23:23:24 +00:00
02d2834636 Fixed jekyll build 2025-03-03 00:22:27 +01:00
95601c75c9 Merge pull request 'Fixing some things' (#1) from dev into main
Some checks failed
Update Cloudflare DNS / update-dns (push) Successful in 29s
Deploy Jekyll site to Pages / build (push) Failing after 28s
Reviewed-on: #1
2025-03-02 23:19:38 +00:00
03a56ef1bb Fixing some things 2025-03-03 00:18:36 +01:00
b2650bb952 remove unnecessary mv
All checks were successful
Update Cloudflare DNS / update-dns (push) Successful in 26s
Deploy Jekyll site to Pages / build (push) Successful in 5m29s
2025-03-03 00:02:50 +01:00
2ae6488249 Fixing some jekyll things and removing old subdomains
Some checks failed
Deploy Jekyll site to Pages / build (push) Waiting to run
Update Cloudflare DNS / update-dns (push) Has been cancelled
2025-03-03 00:02:09 +01:00
e0f579c12b Added checkout step
All checks were successful
Update Cloudflare DNS / update-dns (push) Successful in 1m1s
Deploy Jekyll site to Pages / build (push) Successful in 5m31s
2025-03-02 23:46:34 +01:00
123ff15b1c Next try for dns update script
Some checks failed
Update Cloudflare DNS / update-dns (push) Failing after 37s
Deploy Jekyll site to Pages / build (push) Has been cancelled
2025-03-02 23:44:53 +01:00
ec0dc1bb4f Option to manually execute dns update
Some checks failed
Update Cloudflare DNS / update-dns (push) Failing after 22s
Deploy Jekyll site to Pages / build (push) Has been cancelled
2025-03-02 23:41:25 +01:00
bf5ca6e8a1 Re-ordered ci/cd
Some checks failed
Update Cloudflare DNS / update-dns (push) Failing after 21s
Deploy Jekyll site to Pages / build (push) Has been cancelled
2025-03-02 23:37:00 +01:00
f4b04bd3f4 Improving readme
Some checks failed
Deploy Jekyll site to Pages / build (push) Has been cancelled
Update Cloudflare DNS / update-dns (push) Has been cancelled
2025-03-02 23:36:18 +01:00
eea447a2c5 Fixing cf update script 2025-03-02 23:36:09 +01:00
12 changed files with 244 additions and 31 deletions

View 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! 🚀

View File

@ -5,6 +5,8 @@ on:
branches:
- main
workflow_dispatch:
concurrency:
group: "cloudflare"
cancel-in-progress: false
@ -13,14 +15,20 @@ jobs:
update-dns:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python Virtual Environment
run: |
python3 -m venv venv
source venv/bin/activate
- name: Install Dependencies
run: pip install pyyaml requests
run: |
source venv/bin/activate
pip install pyyaml requests
- name: Update Cloudflare DNS
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
run: python update_cloudflare_dns.py
run: |
source venv/bin/activate
python ./update_cloudflare_dns.py

View File

@ -24,37 +24,49 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: checkout pages
uses: actions/checkout@v4
with:
ref: '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
run: |
apt-get update && \
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/pkuczynski.asc | gpg --import - && \
curl -sSL https://get.rvm.io | bash -s stable && \
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 use $RUBY_VERSION && ruby -v && gem -v && \
gem install bundler jekyll webrick
apt-get update
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/pkuczynski.asc | gpg --import -
curl -sSL https://get.rvm.io | bash -s stable
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 use $RUBY_VERSION && ruby -v && gem -v
gem install bundler jekyll webrick
- name: Build with Jekyll
run: |
source /etc/profile.d/rvm.sh && \
rvm use $RUBY_VERSION && ruby -v && gem -v && \
mv README.md index.md && \
bundle install && \
source /etc/profile.d/rvm.sh
rvm use $RUBY_VERSION && ruby -v && gem -v
bundle install
bundle exec jekyll build --destination pages
env:
JEKYLL_ENV: production
- name: push pages
run: |
cd pages && \
cp ../.domains ./.domains && \
git config user.name "${{ gitea.actor }}" && \
git config user.email ""${{ gitea.actor }}"@noreply.git.morlana.online" && \
git add . && \
git commit -m "jekyll build from Action ${GITHUB_SHA}" && \
cd pages
cp ../.domains ./.domains
git config user.name "${{ gitea.actor }}"
git config user.email ""${{ gitea.actor }}"@noreply.git.morlana.online"
git add .
git commit -m "jekyll build from Action ${GITHUB_SHA}"
git push

7
.jekyllignore Normal file
View File

@ -0,0 +1,7 @@
update_cloudflare_dns.py
domains.yaml
LICENSE
README.md
Gemfile
Gemfile.lock
.gitea

28
DISCLAIMER.md Normal file
View 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.

View File

@ -17,6 +17,7 @@ gem "minima", "~> 2.5"
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.12"
gem "jekyll-remote-theme"
gem "jekyll-readme-index"
end
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem

View File

@ -61,6 +61,8 @@ GEM
webrick (~> 1.7)
jekyll-feed (0.17.0)
jekyll (>= 3.7, < 5.0)
jekyll-readme-index (0.3.0)
jekyll (>= 3.0, < 5.0)
jekyll-remote-theme (0.4.3)
addressable (~> 2.0)
jekyll (>= 3.5, < 5.0)
@ -179,6 +181,7 @@ DEPENDENCIES
http_parser.rb (~> 0.6.0)
jekyll (~> 4.3.4)
jekyll-feed (~> 0.12)
jekyll-readme-index
jekyll-remote-theme
minima (~> 2.5)
tzinfo (>= 1, < 3)

View File

@ -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
View 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.

View File

@ -1,9 +1,23 @@
title: Morlana - Pages
description: >-
Free Subdomains provided by Morlana
baseurl: "/"
url: "https://morlana.page"
show_downloads: false
remote_theme: pages-themes/midnight@v0.2.0
plugins:
- jekyll-remote-theme
- jekyll-readme-index
defaults:
- scope:
path: "README.md"
values:
layout: "default"
title: "Morlana.page Documentation"
include:
- "README.md"

View File

@ -4,8 +4,10 @@ reserved_domains:
- "^internal\\..*"
subdomains:
- name: sitiriotv
target: justin.morlana.space
- name: www
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"
# target: "example.com"
# proxy: true

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