Test
This commit is contained in:
48
.github/workflows/docs.yml
vendored
48
.github/workflows/docs.yml
vendored
@@ -1,46 +1,48 @@
|
|||||||
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
|
||||||
with:
|
with:
|
||||||
luaVersion: 5.4
|
luaVersion: 5.4
|
||||||
|
|
||||||
- name: Setup Lua Rocks
|
- name: Setup LuaRocks
|
||||||
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
|
|
||||||
22
config.ld
22
config.ld
@@ -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"
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user