From e898f331f1ff3b75cdd28474b27cbb11c73c9ac5 Mon Sep 17 00:00:00 2001 From: FatalErr42O <58855799+FatalError42O@users.noreply.github.com> Date: Sat, 9 Sep 2023 11:34:06 -0700 Subject: [PATCH] fixed Busted support (hopefully) --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++++ init.lua | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ed9e4f7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +# Based on https://gist.github.com/domenic/ec8b0fc8ab45f39403dd +name: Documentation + +on: + pull_request: # Build on pull requests to ensure they don't break docs. + branches: + - master + push: # We'll only push new docs when master is updated (see below). + branches: + - master + +jobs: + build: + name: Build Docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup Lua + uses: leafo/gh-actions-lua@v8 + with: + luaVersion: 5.4 + - name: Setup Lua Rocks + uses: leafo/gh-actions-luarocks@v4 + - name: Setup and run ldoc + run: bash ./doc/install_and_build_docs + - name: Deploy + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./doc/out diff --git a/init.lua b/init.lua index 4ced3bb..6c7d6f4 100644 --- a/init.lua +++ b/init.lua @@ -64,7 +64,7 @@ local ie = minetest.request_insecure_environment() --if require isn't present, allow us to load the modules through hackish means --there's like 100s of require calls, it'd be insane to replace them. If you're farmiliar with require, the goal should be obvious. - +modules = "" --this is just for Busted support, as it'll bitch about "attempt to concat a nil value" otherwise. --modules is the path to modules local old_package_path if not ie then