From a7242d08c08f282ef87184ab582c795fcf82639c Mon Sep 17 00:00:00 2001 From: Robert Jelic Date: Sun, 9 Feb 2025 16:44:32 +0100 Subject: [PATCH] Test --- .github/workflows/docs.yml | 83 +++++++++++--------------------------- config.ld | 8 +--- src/main.lua | 1 - 3 files changed, 25 insertions(+), 67 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1d77b28..d55218c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,65 +1,30 @@ -name: Generate Documentation - +name: Build Docs on: - push: - branches: - - main - paths: - - 'src/**' - - '**.lua' pull_request: branches: - - main - paths: - - 'src/**' - - '**.lua' - + - master + push: + branches: + - master jobs: - docs: + build: + name: Build docs runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Install Lua and LDoc - run: | - sudo apt-get update - sudo apt-get install -y lua5.3 \ - lua5.3-dev \ - liblua5.3-dev \ - luarocks \ - build-essential \ - libreadline-dev - - sudo luarocks --lua-version=5.3 install ldoc - - ldoc --version || exit 1 - - - name: Generate Documentation - run: | - echo "Checking config.ld location:" - pwd - ls -la config.ld || echo "config.ld not found in current directory" - - echo "Available Lua-Files:" - find src -name "*.lua" -type f - - echo "Running LDoc with explicit config path..." - ldoc . -c config.ld --verbose - - if [ ! -d "docs" ]; then - echo "Documentation generation failed" - exit 1 - fi - - - name: Commit documentation - if: success() - run: | - git config --global user.name 'github-actions[bot]' - git config --global user.email 'github-actions[bot]@users.noreply.github.com' - git add docs/ - git commit -m 'Update documentation' - git push - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Lua + uses: leafo/gh-actions-lua@v8 + with: + luaVersion: 5.4 + - name: Setup Lua Rocks + uses: leafo/gh-actions-luarocks@v4 + - name: Setup dependencies + run: luarocks install --only-deps ldoc-dev-1.rockspec + - name: Build docs + run: make doc-site + - name: Deploy + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/config.ld b/config.ld index ded5d8c..6022f3f 100644 --- a/config.ld +++ b/config.ld @@ -6,11 +6,5 @@ dir = 'docs' file = {'src'} style = '!pale' sort = true -not_luadoc = true all = true -no_space_before_args = true -wrap = true -one = true -- Generiere eine Datei pro Modul -recurse = true -- Rekursiv durch Unterverzeichnisse gehen -shallow = true -- Behalte Verzeichnisstruktur bei -kind_names = {module = 'Modules', topic = 'Topics'} +topics = {'README.md'} diff --git a/src/main.lua b/src/main.lua index 8ca033c..a237b1a 100644 --- a/src/main.lua +++ b/src/main.lua @@ -186,6 +186,5 @@ function basalt.run(isActive) end end end -basalt.autoUpdate = basalt.run return basalt \ No newline at end of file