This commit is contained in:
Robert Jelic
2025-02-09 18:24:21 +01:00
parent aa46511586
commit facd191ad0
2 changed files with 33 additions and 41 deletions

View File

@@ -1,46 +1,48 @@
name: Build Docs
on:
pull_request:
branches:
- main
push:
branches:
- main
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3
- name: Setup Lua
uses: leafo/gh-actions-lua@v8
with:
luaVersion: 5.4
- name: Setup Lua Rocks
- name: Setup LuaRocks
uses: leafo/gh-actions-luarocks@v4
- name: Install LDoc
run: luarocks install ldoc
- name: Create docs directory
run: mkdir -p docs
- name: Build docs
run: |
ldoc .
ls -la docs || echo "Docs directory is empty"
if [ ! -d "docs" ] || [ -z "$(ls -A docs)" ]; then
echo "Documentation generation failed or produced no files"
exit 1
fi
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: success() && github.event_name == 'push' && github.ref == 'refs/heads/main'
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
force_orphan: true
publish_dir: ./docs

View File

@@ -1,17 +1,7 @@
project = "Basalt 2"
title = "Basalt Documentation"
description = "A Basalt UI Framework Documentation"
format = "markdown"
dir = "docs"
file = "src"
one = true -- Eine Datei pro Modul
not_luadoc = true -- Modernere Dokumentationsformat
merge = true -- Zusammengehörige Dokumentation zusammenführen
plain = true -- Keine HTML-Formatierung
sort = true
all = true
backtick_references = false
kind_names = {
topic = "Manual",
script = "Elements"
}
project = 'Basalt2'
title = 'Basalt Documentation'
description = 'A UI Framework for ComputerCraft'
file = {'src'}
dir = 'docs'
format = 'markdown'
all = true