commit 41405b6f968bb42cdbaa3fff0238699b19e343fc Author: Sean Ntiforo Date: Wed Apr 1 08:29:44 2026 -0500 Git-Pages template for automatic deployment diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml new file mode 100644 index 0000000..16f53ed --- /dev/null +++ b/.forgejo/workflows/publish.yml @@ -0,0 +1,17 @@ +name: Publish Site +on: + push: + branches: [main, pages] + +jobs: + publish: + runs-on: codeberg-tiny + steps: + - uses: actions/checkout@v5 + + - name: Publish to Git-Pages + uses: actions/git-pages@v2 + with: + site: https://pages.ntiforo.net/${{ github.event.repository.name }}/ + password: ${{ secrets.GIT_PAGES_PASSWORD }} + source: .index/ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..433114b --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +# OS Files +.DS_Store +Thumbs.db +Desktop.ini + +# Editor Files +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# Node.js +node_modules/ +npm-debug.log +yarn-error.log + +# Build Outputs +dist/ +build/ +out/ + +# Logs +*.log +logs/ + +# Environment +.env +.env.local + +# Temporary Files +tmp/ +temp/ diff --git a/.index/index.html b/.index/index.html new file mode 100644 index 0000000..55ed41e --- /dev/null +++ b/.index/index.html @@ -0,0 +1,61 @@ + + + + + + ${{ github.event.repository.name }} + + + +
🌟
+

${{ github.event.repository.name }}

+
+

Welcome to your Git-Pages site!

+

This site is automatically deployed from this repository.

+
+

📁 Edit .index/index.html to customize this page.

+

🔄 Push to main or pages to auto-deploy.

+ + diff --git a/README.md b/README.md new file mode 100644 index 0000000..677c33d --- /dev/null +++ b/README.md @@ -0,0 +1,90 @@ +# Git-Pages Template + +This repository is a template for deploying static sites to your Git-Pages server at `pages.ntiforo.net`. + +## 🚀 How It Works + +1. **Use this template** to create a new repository +2. **Push your static site** to the `.index/` directory +3. **Forgejo Action** automatically deploys on push to `main` or `pages` +4. **Your site is live** at `https://pages.ntiforo.net//` + +## 📁 Structure + +``` +. +├── .forgejo/ +│ └── workflows/ +│ └── publish.yml # Auto-deployment workflow +├── .index/ +│ └── index.html # Your site contents +├── README.md # This file +└── .gitignore # Git ignore rules +``` + +## 🛠️ Setup + +### 1. Create Repository from Template + +Click **"Use this template"** → Create new repository + +### 2. Add Secret + +Go to: **Settings → Secrets → Actions → New secret** + +- **Name:** `GIT_PAGES_PASSWORD` +- **Value:** Your git-pages server password + +### 3. Push Your Site + +Replace `.index/index.html` with your content, then: + +```bash +git add . +git commit -m "Initial site" +git push origin main +``` + +## 📝 Customization + +### Add More Pages + +Create additional HTML files in `.index/`: + +``` +.index/ +├── index.html # Homepage (https://pages.ntiforo.net/repo/) +├── about.html # About page (https://pages.ntiforo.net/repo/about.html) +└── css/ + └── styles.css # Custom styles +``` + +### Update Workflow + +Edit `.forgejo/workflows/publish.yml` to: +- Change the site URL +- Add build steps (e.g., for static site generators) +- Customize deployment behavior + +## 🔐 Security + +- Keep `GIT_PAGES_PASSWORD` secret secure +- Only push to trusted repositories +- Consider using forge token authorization instead of password (see git-pages docs) + +## 🎯 Examples + +- Single page site: Just use `.index/index.html` +- Multi-page site: Add more HTML files to `.index/` +- Static site generator: Add build step, output to `.index/` + +## 📚 Resources + +- [Git-Pages Documentation](https://git-pages.org) +- [Git-Pages Action](https://codeberg.org/git-pages/action) +- [Git-Pages CLI](https://codeberg.org/git-pages/git-pages-cli) + +--- + +**Created by:** Cammy 💦 +**Date:** 2026-04-01