Skip to content

Commit 49f6a8a

Browse files
Add GH action to monitor projects
1 parent 221c2e3 commit 49f6a8a

File tree

8 files changed

+423
-0
lines changed

8 files changed

+423
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Project Watch
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 7 * * 1"
7+
8+
permissions:
9+
contents: write
10+
issues: write
11+
12+
jobs:
13+
monitor:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Check out repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.12"
24+
25+
- name: Run project checks
26+
id: checks
27+
continue-on-error: true
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: |
31+
python scripts/check_projects.py \
32+
--registry projects.json \
33+
--status-json monitoring/project-status.json \
34+
--status-md monitoring/project-status.md
35+
36+
- name: Detect snapshot changes
37+
id: snapshot
38+
shell: bash
39+
run: |
40+
if git diff --quiet -- monitoring/project-status.json monitoring/project-status.md; then
41+
echo "changed=false" >> "$GITHUB_OUTPUT"
42+
else
43+
echo "changed=true" >> "$GITHUB_OUTPUT"
44+
fi
45+
46+
- name: Commit updated monitoring snapshot
47+
if: steps.snapshot.outputs.changed == 'true'
48+
shell: bash
49+
run: |
50+
git config user.name "github-actions[bot]"
51+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
52+
git add monitoring/project-status.json monitoring/project-status.md
53+
git commit -m "chore: update project watch snapshot"
54+
git push
55+
56+
- name: Open issue when alerts or changes are detected
57+
if: steps.checks.outcome != 'success' || steps.snapshot.outputs.changed == 'true'
58+
uses: actions/github-script@v7
59+
with:
60+
script: |
61+
const fs = require("fs");
62+
const body = fs.readFileSync("monitoring/project-status.md", "utf8");
63+
const title = `Project watch update - ${new Date().toISOString().slice(0, 10)}`;
64+
await github.rest.issues.create({
65+
owner: context.repo.owner,
66+
repo: context.repo.repo,
67+
title,
68+
body
69+
});

AGENTS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ This repository contains the static GitHub Pages landing site for the Multilingu
99
## Key files
1010

1111
- `index.html`: primary page, including markup, inline CSS, and inline JavaScript
12+
- `projects.json`: canonical registry for tracked multilingual projects and linked pages
13+
- `scripts/check_projects.py`: dependency-free monitoring script used by GitHub Actions
14+
- `monitoring/`: generated status snapshots for ecosystem tracking
1215
- `assets/images/`: image assets used by the landing page
1316
- `README.md`: repository overview and related links
1417
- `CONTRIBUTING.md`: contributor workflow and expectations
@@ -29,6 +32,7 @@ This repository contains the static GitHub Pages landing site for the Multilingu
2932
- Reuse existing CSS classes and section patterns where practical.
3033
- Keep JavaScript small and dependency-free.
3134
- If you add a new section to `index.html`, make sure the copy is consistent with the rest of the page.
35+
- If you change tracked external links, update `projects.json` too.
3236

3337
## Validation
3438

@@ -41,6 +45,7 @@ After edits, do a lightweight verification pass:
4145
## Common tasks
4246

4347
- Add or update links to docs, playgrounds, and project repositories
48+
- Update the project registry and monitoring coverage
4449
- Refresh landing page copy
4550
- Improve metadata or assets for GitHub Pages
4651
- Expand repository documentation

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ This repository hosts the public GitHub Pages website for the project. Most chan
1414

1515
## Repository layout
1616

17+
- `projects.json`: central registry of tracked repos and live pages
18+
- `scripts/check_projects.py`: monitoring script used by GitHub Actions
19+
- `monitoring/`: generated status snapshots and human-readable reports
1720
- `index.html`: main landing page, inline styles, and inline JavaScript
1821
- `assets/images/`: logos, favicon source, and social preview assets
1922
- `robots.txt`, `sitemap.xml`, `site.webmanifest`: site metadata files
@@ -42,6 +45,7 @@ Then visit `http://localhost:8000/`.
4245
- Prefer official project URLs under `multilingualprogramming.github.io` and `github.com/multilingualprogramming` when available.
4346
- Preserve the current visual style unless the change is intentionally a design refresh.
4447
- Keep external links opening safely with `target="_blank"` and `rel="noopener"` where appropriate.
48+
- If you add or change a linked project, update `projects.json` in the same change.
4549

4650
## HTML, CSS, and JS guidance
4751

@@ -57,6 +61,7 @@ Please check:
5761

5862
- The page loads without console errors in a browser
5963
- New links are correct
64+
- `projects.json` matches any new or updated links
6065
- Mobile and desktop layouts still work
6166
- Copy changes are free of obvious typos
6267
- Any added assets are optimized and referenced correctly

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This repository contains the GitHub Pages landing site for the Multilingual Prog
44

55
The site is a static single-page experience built around [`index.html`](./index.html) and a small set of assets in [`assets/images/`](./assets/images/). It highlights the language, links to documentation and the playground, and showcases related projects.
66

7+
This repository also acts as the central landing-page registry for linked multilingual projects and includes a scheduled monitoring workflow to help track repo and site changes across the ecosystem.
8+
79
## Live site
810

911
- Main site: [multilingualprogramming.github.io](https://multilingualprogramming.github.io/)
@@ -26,6 +28,11 @@ The site is a static single-page experience built around [`index.html`](./index.
2628

2729
```text
2830
.
31+
|-- .github/
32+
| `-- workflows/
33+
|-- monitoring/
34+
|-- scripts/
35+
|-- projects.json
2936
|-- index.html
3037
|-- assets/
3138
| `-- images/
@@ -36,6 +43,32 @@ The site is a static single-page experience built around [`index.html`](./index.
3643
`-- site.webmanifest
3744
```
3845

46+
## Project registry
47+
48+
The file [`projects.json`](./projects.json) is the central registry for the projects this landing page points to. Each entry includes the primary repository, live site URL, category, language, status, and review date.
49+
50+
When you add or update a project link on the landing page, update the registry too so monitoring stays in sync.
51+
52+
## Monitoring
53+
54+
This repository now includes a scheduled GitHub Actions workflow at [`.github/workflows/project-watch.yml`](./.github/workflows/project-watch.yml).
55+
56+
It is designed to:
57+
58+
- Check linked GitHub Pages URLs for basic availability
59+
- Fetch GitHub repository metadata for the tracked projects
60+
- Record a snapshot in [`monitoring/project-status.json`](./monitoring/project-status.json)
61+
- Publish a readable report in [`monitoring/project-status.md`](./monitoring/project-status.md)
62+
- Open an issue when alerts or snapshot changes are detected
63+
64+
The checker itself lives in [`scripts/check_projects.py`](./scripts/check_projects.py).
65+
66+
## Status snapshot
67+
68+
The latest committed monitoring report is available at [`monitoring/project-status.md`](./monitoring/project-status.md).
69+
70+
After the first GitHub Actions run, this file will show the latest observed status for the landing page, docs, playground, and showcase projects.
71+
3972
## Local preview
4073

4174
Because this is a static site, you can preview it with any simple local HTTP server.

monitoring/project-status.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"generated_at": "pending-first-run",
3+
"alert_count": 0,
4+
"changes": [
5+
"Awaiting the first GitHub Actions monitoring run."
6+
],
7+
"projects": []
8+
}

monitoring/project-status.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Project Watch Status
2+
3+
- Generated at: `pending-first-run`
4+
- Projects monitored: `0`
5+
- Alert count: `0`
6+
7+
## Notable changes
8+
9+
- Awaiting the first GitHub Actions monitoring run.
10+
11+
## Snapshot
12+
13+
The weekly monitoring workflow will populate this report after its first scheduled or manual run.

projects.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"generated_at": "2026-03-15",
3+
"projects": [
4+
{
5+
"id": "main-site",
6+
"name": "Multilingual Programming Language",
7+
"category": "landing",
8+
"description": "Main landing page for the multilingual programming language ecosystem.",
9+
"repo_url": "https://github.com/multilingualprogramming/multilingual",
10+
"alternate_repo_urls": [
11+
"https://github.com/johnsamuelwrites/multilingual"
12+
],
13+
"site_url": "https://multilingualprogramming.github.io/",
14+
"language": "multilingual",
15+
"status": "active",
16+
"last_reviewed": "2026-03-15"
17+
},
18+
{
19+
"id": "documentation",
20+
"name": "Documentation",
21+
"category": "docs",
22+
"description": "Project documentation site and source repository.",
23+
"repo_url": "https://github.com/multilingualprogramming/docs",
24+
"site_url": "https://multilingualprogramming.github.io/docs/",
25+
"language": "English",
26+
"status": "active",
27+
"last_reviewed": "2026-03-15"
28+
},
29+
{
30+
"id": "playground",
31+
"name": "Playground",
32+
"category": "tooling",
33+
"description": "Browser playground for trying multilingual programs and generated output.",
34+
"repo_url": "https://github.com/multilingualprogramming/playground",
35+
"site_url": "https://multilingualprogramming.github.io/playground/",
36+
"language": "multilingual",
37+
"status": "active",
38+
"last_reviewed": "2026-03-15"
39+
},
40+
{
41+
"id": "fractales",
42+
"name": "Fractales",
43+
"category": "showcase",
44+
"description": "French-language fractal project built with the multilingual programming language.",
45+
"repo_url": "https://github.com/multilingualprogramming/fractales",
46+
"site_url": "https://multilingualprogramming.github.io/fractales/",
47+
"language": "French",
48+
"status": "active",
49+
"last_reviewed": "2026-03-15"
50+
},
51+
{
52+
"id": "cellcosmos",
53+
"name": "Cellular Automata",
54+
"category": "showcase",
55+
"description": "French-language cellular automata project published as cellcosmos.",
56+
"repo_url": "https://github.com/multilingualprogramming/cellcosmos",
57+
"site_url": "https://multilingualprogramming.github.io/cellcosmos/",
58+
"language": "French",
59+
"status": "active",
60+
"last_reviewed": "2026-03-15"
61+
}
62+
]
63+
}

0 commit comments

Comments
 (0)