Skip to content

Commit

Permalink
add mtinfo generate workflow (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Mar 16, 2021
1 parent b070f27 commit 88077d0
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/mtinfo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: mtinfo

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v1

- name: generate
run: ./generate-mtinfo.sh

- name: deploy
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ A mod for [minetest](http://www.minetest.net)
![integration-test](https://github.com/mt-mods/technic/workflows/integration-test/badge.svg)
![luacheck](https://github.com/mt-mods/technic/workflows/luacheck/badge.svg)
![mineunit](https://github.com/mt-mods/technic/workflows/mineunit/badge.svg)
![mtinfo](https://github.com/mt-mods/technic/workflows/mtinfo/badge.svg)
![](https://byob.yarr.is/mt-mods/technic/coverage)

[![License](https://img.shields.io/badge/license-LGPLv2.0%2B-purple.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.en.html)
Expand Down Expand Up @@ -38,6 +39,7 @@ their own manuals:
* [Pipeworks Documentation](https://gitlab.com/VanessaE/pipeworks/-/wikis/home)
* [Moreores Forum Post](https://forum.minetest.net/viewtopic.php?t=549)
* [Basic materials Repository](https://gitlab.com/VanessaE/basic_materials)
* [mtinfo generated documentation](https://mt-mods.github.io/technic/#/mods/technic/items)

Recipes for constructable items in technic are generally not guessable,
and are also not specifically documented here. You should use a
Expand Down
25 changes: 25 additions & 0 deletions generate-mtinfo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh

# prepare config
CONFIG=/tmp/technic_minetest.conf
echo "mtinfo.autoshutdown = true" > ${CONFIG}

# prepare dependent mods
WORLDMODS_DIR=/tmp/technic_worldmods
git clone --depth=1 https://gitlab.com/VanessaE/basic_materials.git ${WORLDMODS_DIR}/basic_materials
git clone --depth=1 https://gitlab.com/VanessaE/pipeworks.git ${WORLDMODS_DIR}/pipeworks
git clone --depth=1 https://gitlab.com/VanessaE/unifieddyes.git ${WORLDMODS_DIR}/unifieddyes
git clone --depth=1 https://github.com/BuckarooBanzay/mtinfo.git ${WORLDMODS_DIR}/mtinfo
cp . ${WORLDMODS_DIR}/technic -R

# start container with mtinfo
docker run --rm -i \
--user root \
-v ${CONFIG}:/etc/minetest/minetest.conf:ro \
-v ${WORLDMODS_DIR}/:/root/.minetest/worlds/world/worldmods \
-v $(pwd)/output:/root/.minetest/worlds/world/mtinfo \
registry.gitlab.com/minetest/minetest/server:5.3.0

test -f $(pwd)/output/index.html || exit 1
test -f $(pwd)/output/data/items.js || exit 1
test -d $(pwd)/output/textures || exit 1

0 comments on commit 88077d0

Please sign in to comment.