48 lines
1002 B
YAML
48 lines
1002 B
YAML
name: Build Docs
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup Lua
|
|
uses: leafo/gh-actions-lua@v8
|
|
with:
|
|
luaVersion: 5.4
|
|
|
|
- name: Setup LuaRocks
|
|
uses: leafo/gh-actions-luarocks@v4
|
|
|
|
- name: Install LDoc
|
|
run: |
|
|
luarocks install ldoc
|
|
ldoc --help
|
|
|
|
- name: Debug Info
|
|
run: |
|
|
echo "Current directory:"
|
|
pwd
|
|
echo "Files in src:"
|
|
find src -type f -name "*.lua"
|
|
echo "Config file:"
|
|
cat config.ld
|
|
|
|
- name: Generate Docs
|
|
run: |
|
|
rm -rf docs
|
|
ldoc . --verbose --debug
|
|
echo "Generated files:"
|
|
find docs -type f
|
|
|
|
- name: Deploy
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./docs |