From 1cd053fb6ad87f2a4dacb769a34d7f8dcbeb835b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 Oct 2026 08:44:20 +0000 Subject: [PATCH] Apply remaining changes Co-authored-by: JannisHeydemann <149153326+JannisHeydemann@users.noreply.github.com> --- .github/workflows/deploy-wiki.yml | 44 +++++++++++++++++++++++++++ .github/workflows/wiki-sync.yml | 32 ------------------- docs/{wiki => }/Code-Documentation.md | 2 +- docs/{wiki => }/Contributing.md | 2 +- docs/{wiki => }/Game-Mechanics.md | 2 +- docs/{wiki/Home.md => index.md} | 6 ++-- docs/wiki/_Sidebar.md | 4 --- mkdocs.yml | 36 ++++++++++++++++++++++ 8 files changed, 86 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/deploy-wiki.yml delete mode 100644 .github/workflows/wiki-sync.yml rename docs/{wiki => }/Code-Documentation.md (96%) rename docs/{wiki => }/Contributing.md (60%) rename docs/{wiki => }/Game-Mechanics.md (94%) rename docs/{wiki/Home.md => index.md} (80%) delete mode 100644 docs/wiki/_Sidebar.md create mode 100644 mkdocs.yml diff --git a/.github/workflows/deploy-wiki.yml b/.github/workflows/deploy-wiki.yml new file mode 100644 index 0000000..313b6be --- /dev/null +++ b/.github/workflows/deploy-wiki.yml @@ -0,0 +1,44 @@ +name: Deploy wiki + +on: + push: + branches: [main, master] + paths: + - 'docs/**' + - 'mkdocs.yml' + - '.github/workflows/deploy-wiki.yml' + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - run: pip install mkdocs-material + - uses: actions/configure-pages@v5 + - run: mkdocs build --strict + - uses: actions/upload-pages-artifact@v3 + with: + path: site + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/wiki-sync.yml b/.github/workflows/wiki-sync.yml deleted file mode 100644 index 973d2e3..0000000 --- a/.github/workflows/wiki-sync.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Wiki sync - -on: - push: - branches: [master] - paths: - - 'docs/wiki/**' - - '.github/workflows/wiki-sync.yml' - workflow_dispatch: - -permissions: - contents: write - -jobs: - sync: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Publish docs/wiki to the GitHub Wiki - env: - TOKEN: ${{ secrets.WIKI_SYNC_TOKEN }} - REPO: ${{ github.repository }} - run: | - git clone "https://x-access-token:${TOKEN}@github.com/${REPO}.wiki.git" /tmp/wiki - rsync -a --delete --exclude='.git' docs/wiki/ /tmp/wiki/ - cd /tmp/wiki - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add -A - git diff --cached --quiet && exit 0 - git commit -m "Sync wiki from ${GITHUB_SHA}" - git push diff --git a/docs/wiki/Code-Documentation.md b/docs/Code-Documentation.md similarity index 96% rename from docs/wiki/Code-Documentation.md rename to docs/Code-Documentation.md index 502721b..273d27e 100644 --- a/docs/wiki/Code-Documentation.md +++ b/docs/Code-Documentation.md @@ -24,4 +24,4 @@ Package root: `astro.tjm` (mod id `tjm`). Entrypoints are declared in `fabric.mo Code driven: use the `minecraft:impossible` trigger and call `award(player, world, "", "")` from an event in `TheJourneyMatters`. ## Build -`./gradlew build` (JDK 25). See [[Contributing]]. +`./gradlew build` (JDK 25). See [Contributing](Contributing.md). diff --git a/docs/wiki/Contributing.md b/docs/Contributing.md similarity index 60% rename from docs/wiki/Contributing.md rename to docs/Contributing.md index 3589658..37549a0 100644 --- a/docs/wiki/Contributing.md +++ b/docs/Contributing.md @@ -7,4 +7,4 @@ 5. `./gradlew javadoc` – generate API docs. ## Docs -Wiki pages live in `docs/wiki/` in the main repo. Edit them via pull request; the `Wiki sync` workflow publishes them to the GitHub Wiki on merge to `master`. Do not edit the wiki directly, as changes will be overwritten. +Wiki pages live in `docs/` in the main repo and are built with MkDocs. Edit them via pull request; the `Deploy wiki` workflow publishes them to GitHub Pages on merge to `master`. diff --git a/docs/wiki/Game-Mechanics.md b/docs/Game-Mechanics.md similarity index 94% rename from docs/wiki/Game-Mechanics.md rename to docs/Game-Mechanics.md index 62c2439..e603a6a 100644 --- a/docs/wiki/Game-Mechanics.md +++ b/docs/Game-Mechanics.md @@ -10,7 +10,7 @@ The root advancement `tjm:root` ("The Journey Matters", bedrock icon) creates th | The First of Its Kind | `tjm:adventure/first_of_its_kind` | Bone | Have your tamed wolf kill a mob in the Nether. | | The Grocer | `tjm:adventure/the_grocer` | Emerald | Trade with a villager of every profession (13 criteria, all required). | -All three use the "goal" frame and grant no rewards. `nether_roof` and `first_of_its_kind` use the `minecraft:impossible` trigger and are awarded from code (see [[Code Documentation|Code-Documentation]]). `the_grocer` is fully data driven. +All three use the "goal" frame and grant no rewards. `nether_roof` and `first_of_its_kind` use the `minecraft:impossible` trigger and are awarded from code (see [Code Documentation](Code-Documentation.md)). `the_grocer` is fully data driven. Villager professions required: armorer, butcher, cartographer, cleric, farmer, fisherman, fletcher, leatherworker, librarian, mason, shepherd, toolsmith, weaponsmith. diff --git a/docs/wiki/Home.md b/docs/index.md similarity index 80% rename from docs/wiki/Home.md rename to docs/index.md index b8300ad..f2d2ae7 100644 --- a/docs/wiki/Home.md +++ b/docs/index.md @@ -18,6 +18,6 @@ A Fabric mod that adds a custom **Journey** advancement tab and a few Nether rul 3. Start the game. ## Pages -- [[Game Mechanics|Game-Mechanics]] -- [[Code Documentation|Code-Documentation]] -- [[Contributing]] +- [Game Mechanics](Game-Mechanics.md) +- [Code Documentation](Code-Documentation.md) +- [Contributing](Contributing.md) diff --git a/docs/wiki/_Sidebar.md b/docs/wiki/_Sidebar.md deleted file mode 100644 index b70cf8b..0000000 --- a/docs/wiki/_Sidebar.md +++ /dev/null @@ -1,4 +0,0 @@ -- [[Home]] -- [[Game Mechanics|Game-Mechanics]] -- [[Code Documentation|Code-Documentation]] -- [[Contributing]] diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..4613030 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,36 @@ +site_name: TJM – The Journey Matters +site_description: Documentation for the TJM Fabric mod +repo_url: https://github.com/JannisHeydemann/TJM +docs_dir: docs +theme: + name: material + features: + - search.suggest + - search.highlight + - navigation.instant + - navigation.top + - content.code.copy + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/weather-night + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/weather-sunny + name: Switch to light mode +plugins: + - search +markdown_extensions: + - admonition + - toc: + permalink: true + - pymdownx.highlight + - pymdownx.superfences +nav: + - Home: index.md + - Game Mechanics: Game-Mechanics.md + - Code Documentation: Code-Documentation.md + - Contributing: Contributing.md