From f4b3e2e7c2f2fedf2f02826e333bfd84aacd304c Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Fri, 30 Jul 2021 17:55:50 -0700 Subject: [PATCH] Add GitHub workflow for building HTML docs on gh-pages branch --- .github/workflows/reference.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 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..cd61ab9 --- /dev/null +++ b/.github/workflows/reference.yml @@ -0,0 +1,31 @@ +name: Build Reference + +on: + push: + branches: + - master + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + 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 LDoc dependencies + run: luarocks install --only-deps https://raw.githubusercontent.com/lunarmodules/LDoc/master/ldoc-scm-3.rockspec + - name: Setup LDoc + run: git clone --single-branch --branch=custom https://github.com/AntumDeluge/ldoc.git .ldoc/ldoc && chmod +x .ldoc/ldoc/ldoc.lua + - name: Generate docs + run: chmod +x .ldoc/gendoc.sh && ./.ldoc/gendoc.sh + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/