mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-11-12 05:20:41 +01:00
c790b20169
* Add Python scripts to generate temp files that can be parsed by LDoc * Add config & script for generating HTML docs with LDoc... * Add Lua docstrings for API & items * Add workflow for building API reference docs on gh-pages branch * Add LDoc's default stylesheet * LDoc: make navigation panel fixed
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
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 temp files
|
|
run: chmod +x .ldoc/parse_*.py && ./.ldoc/parse_src.py && ./.ldoc/parse_settings.py && ./.ldoc/parse_crafts.py
|
|
- name: Generate docs
|
|
run: ./.ldoc/ldoc/ldoc.lua --UNSAFE_NO_SANDBOX -c .ldoc/config.ld -d 3d_armor/docs/reference "$(pwd)"
|
|
- name: Deploy
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./3d_armor/docs
|