From ae94c38182f458481d1b342e80528d0890aedccc Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Mon, 16 Aug 2021 01:20:36 -0700 Subject: [PATCH] Add GitHub workflow for building docs on gh-pages branch --- .github/workflows/reference.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/reference.yml diff --git a/.github/workflows/reference.yml b/.github/workflows/reference.yml new file mode 100644 index 0000000..003c655 --- /dev/null +++ b/.github/workflows/reference.yml @@ -0,0 +1,29 @@ + +name: Build Reference +on: + push: + tags: + - 'v[0-9]*' + +jobs: + build: + name: Build Reference + runs-on: ubuntu-latest + steps: + - 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 dependencies + run: luarocks install --only-deps https://raw.githubusercontent.com/lunarmodules/LDoc/master/ldoc-scm-3.rockspec + - name: Setup LDoc + run: git clone --branch=custom https://github.com/AntumDeluge/LDoc.git ldoc + - name: Checkout & Build Docs + run: git clone https://github.com/AntumMT/mod-alternode.git alternode && cd alternode && chmod +x .ldoc/build_versioned_docs.sh && ./.ldoc/build_versioned_docs.sh + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: alternode/docs/