diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 852b7d3..d79de59 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 \ No newline at end of file + publish_dir: ./docs \ No newline at end of file diff --git a/config.ld b/config.ld index ad04b24..f0b468f 100644 --- a/config.ld +++ b/config.ld @@ -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" -} \ No newline at end of file +project = 'Basalt2' +title = 'Basalt Documentation' +description = 'A UI Framework for ComputerCraft' +file = {'src'} +dir = 'docs' +format = 'markdown' +all = true \ No newline at end of file