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,18 +1,15 @@
name: Build Docs name: Build Docs
on: on:
pull_request:
branches:
- main
push: push:
branches: branches: [main]
- main pull_request:
branches: [main]
jobs: jobs:
build: build:
name: Build docs
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - uses: actions/checkout@v3
uses: actions/checkout@v3
- name: Setup Lua - name: Setup Lua
uses: leafo/gh-actions-lua@v8 uses: leafo/gh-actions-lua@v8
@@ -23,24 +20,29 @@ jobs:
uses: leafo/gh-actions-luarocks@v4 uses: leafo/gh-actions-luarocks@v4
- name: Install LDoc - name: Install LDoc
run: luarocks install ldoc
- name: Create docs directory
run: mkdir -p docs
- name: Build docs
run: | run: |
ldoc . luarocks install ldoc
ls -la docs || echo "Docs directory is empty" ldoc --help
if [ ! -d "docs" ] || [ -z "$(ls -A docs)" ]; then
echo "Documentation generation failed or produced no files" - name: Debug Info
exit 1 run: |
fi 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 - 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 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs publish_dir: ./docs
force_orphan: true

View File

@@ -1,17 +1,7 @@
project = "Basalt 2" project = 'Basalt2'
title = "Basalt Documentation" title = 'Basalt Documentation'
description = "A Basalt UI Framework Documentation" description = 'A UI Framework for ComputerCraft'
format = "markdown" file = {'src'}
dir = "docs" dir = 'docs'
file = "src" format = 'markdown'
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 all = true
backtick_references = false
kind_names = {
topic = "Manual",
script = "Elements"
}