Scaffold: deploy workflow, AGENTS/CLAUDE/README
Some checks are pending
/ deploy (push) Waiting to run

This commit is contained in:
Workshop Bot 2026-06-09 20:29:57 +00:00
parent 6774148618
commit 65dfd25236
4 changed files with 114 additions and 1 deletions

View file

@ -0,0 +1,25 @@
on:
push:
branches: [main]
jobs:
deploy:
runs-on: docker
steps:
- uses: actions/checkout@v4
- name: Restart Nomad allocation
env:
NOMAD_ADDR: ${{ secrets.NOMAD_ADDR }}
NOMAD_TOKEN: ${{ secrets.NOMAD_TOKEN }}
run: |
set -e
ALLOC_ID=$(curl -sf \
-H "X-Nomad-Token: $NOMAD_TOKEN" \
"$NOMAD_ADDR/v1/job/familyfed/allocations" \
| python3 -c "import sys,json; allocs=json.load(sys.stdin); print(next(a['ID'] for a in allocs if a['ClientStatus']=='running'))")
echo "Stopping allocation to trigger fresh prestart: $ALLOC_ID"
curl -sf -X POST \
-H "X-Nomad-Token: $NOMAD_TOKEN" \
"$NOMAD_ADDR/v1/allocation/$ALLOC_ID/stop"
echo "Deploy triggered — Nomad will schedule a new alloc that re-fetches the site."

74
AGENTS.md Normal file
View file

@ -0,0 +1,74 @@
# AGENTS.md — Family Fed Ireland website
This file tells any AI coding assistant how to work on this website. Read it before
making changes.
## What this is
A static replica of the **Family Fed Ireland** website (familyfed.ie). It is a
**plain static site**: HTML, CSS, JavaScript and image assets with **no build step
and no dependencies**. The files in this repo are served to visitors *exactly as they
are committed* — what you see locally is what goes live.
The replica is served at **https://familyfed.bcgen.ie**.
## Repo map
| Path | What it is |
|------|------------|
| `index.html` | Home page |
| `*.html` | Top-level pages |
| `css/` | Stylesheets |
| `js/` | Page JavaScript |
| `assets/` | Images, fonts, and other static assets |
| `.forgejo/` | **Deploy automation — do not touch** (see "Guardrails") |
Preview through a local web server, not by opening the `.html` file directly, so
that absolute links (e.g. `/css/style.css`) resolve.
## The workflow (follow this every time)
### 1. Make changes on a branch
Never edit `main` directly. Start from an up-to-date `main` and create a branch:
```bash
git checkout main && git pull
git checkout -b describe-your-change
```
### 2. Preview locally before shipping
From the repo root, start a local server and open it in a browser:
```bash
python3 -m http.server 8000
# then open http://localhost:8000
```
Visually check every page you touched. **Do not ship a change you have not previewed.**
### 3. Open a pull request into `main`
When it looks right, commit, push the branch, and open a PR targeting `main`:
```bash
git add -A
git commit -m "Describe your change"
git push -u origin describe-your-change
```
### 4. Merge to publish
Merging the PR into `main` triggers automatic deployment. The live site at
**https://familyfed.bcgen.ie** updates within about a minute. There is nothing else
to run or deploy.
## Guardrails
- **Keep it dependency-free static HTML/CSS/JS.** No frameworks, bundlers, or build
tools — anything added to the repo is served raw.
- **Never edit `.forgejo/`** or anything related to deployment/hosting. That is managed
separately; changing it can break publishing.
- Keep new images in `assets/`, prefer modern formats (`.webp`/`.avif`) where possible,
and keep them reasonably small so pages load fast.
- After editing, check that internal links and images still resolve (you'll catch this
in the local preview).
- Match the existing style and reuse the classes already defined under `css/` rather
than inventing new patterns.

2
CLAUDE.md Normal file
View file

@ -0,0 +1,2 @@
See [AGENTS.md](./AGENTS.md) for how to work on this website (repo layout, local
preview, and the branch → PR → merge-to-publish workflow).

View file

@ -1,3 +1,15 @@
# familyfedie-website # familyfedie-website
Static replica of the familyfed.ie website, served at familyfed.bcgen.ie A static replica of the **Family Fed Ireland** website (familyfed.ie) — plain
HTML/CSS/JS, served exactly as committed.
Live at **https://familyfed.bcgen.ie**.
## Editing & deploy
Plain static files, no build step. Edit on a branch, **preview locally**
(`python3 -m http.server 8000` → http://localhost:8000), open a PR into `main`, and
merge — merging `main` auto-deploys to the live site within ~1 minute.
See **[AGENTS.md](./AGENTS.md)** for the full workflow and repo layout (also read by
AI coding assistants).