Skip to content

Commit 1018604

Browse files
committed
feat: readme, CI
1 parent dc8eb3d commit 1018604

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,19 @@ name: Build (and eventually deploy)
22

33
on:
44
push:
5+
branches: [main]
56
pull_request:
67
branches: [main]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
718

819
env:
920
CARGO_TERM_COLOR: always
@@ -25,3 +36,46 @@ jobs:
2536

2637
- name: Run tests
2738
run: cargo test
39+
40+
build:
41+
name: Build
42+
needs: test
43+
runs-on: ubuntu-latest
44+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
45+
steps:
46+
- name: Checkout repository
47+
uses: actions/checkout@v5
48+
with:
49+
fetch-depth: 0
50+
51+
- name: Install Rust toolchain
52+
uses: dtolnay/rust-toolchain@stable
53+
54+
- name: Cache dependencies
55+
uses: Swatinem/rust-cache@v2
56+
57+
- name: Install system dependencies
58+
run: |
59+
sudo apt-get update
60+
sudo apt-get install -y lld
61+
62+
- name: Build site
63+
run: cargo run --release
64+
65+
- name: Upload artifact
66+
uses: actions/upload-pages-artifact@v3
67+
with:
68+
path: ./output
69+
70+
deploy:
71+
name: Deploy
72+
needs: build
73+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
74+
environment:
75+
name: github-pages
76+
url: ${{ steps.deployment.outputs.page_url }}
77+
runs-on: ubuntu-latest
78+
steps:
79+
- name: Deploy to GitHub Pages
80+
id: deployment
81+
uses: actions/deploy-pages@v4

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# JC2-MP Wiki
2+
3+
This is the JC2-MP wiki, recovered from a 2014 backup and deployed to GitHub Pages.
4+
5+
## About
6+
7+
After recovering the wiki content from a 2014 wikitext dump, we built a custom Rust-based static site generator to render it. The SSG parses MediaWiki markup, processes templates, and generates a fully static website that mirrors the original wiki, without any of the overhead of running MediaWiki itself.
8+
9+
Some effort will be made to salvage additional content from Internet Archive as time and effort permit.
10+
11+
## Building the Site
12+
13+
```bash
14+
cargo run
15+
```
16+
17+
This generates the static site in the `output/` directory. This is run by the CI, which will then automatically deploy to GitHub Pages.

0 commit comments

Comments
 (0)