From b8eccac2d1109cb86530e14eb10499f12f3f6b3b Mon Sep 17 00:00:00 2001 From: MisanthropicBit Date: Sat, 6 Apr 2024 23:13:11 +0200 Subject: [PATCH] Add workflow for generating documentation (#8) --- .github/workflows/docs.yml | 40 ++++++++++++++++++++++++++++++++++ .github/workflows/luarocks.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/style.yml | 2 +- .github/workflows/tests.yml | 2 +- doc/.gitkeep | 0 6 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/docs.yml create mode 100644 doc/.gitkeep diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..c006d43 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,40 @@ +name: autogen-docs + +on: + push: + branches: [master] + pull_request: + +jobs: + docs: + runs-on: ubuntu-latest + name: generate docs + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + - name: panvimdoc + uses: kdheepak/panvimdoc@v4.0.0 + with: + vimdoc: neotest-busted + pandoc: "README.md" + version: "NVIM >= v0.9.0" + toc: true + description: "Neotest adapter for running tests using busted with neovim as the lua interpreter." + demojify: false + dedupsubheadings: true + treesitter: true + ignorerawblocks: true + docmapping: false + docmappingprojectname: true + shiftheadinglevelby: 0 + incrementheadinglevelby: 0 + - uses: stefanzweifel/git-auto-commit-action@v4 + if: github.ref == 'refs/heads/master' + with: + commit_message: "Auto-generate docs" + commit_user_name: "github-actions[bot]" + commit_user_email: "github-actions[bot]@users.noreply.github.com" + commit_author: "github-actions[bot] " diff --git a/.github/workflows/luarocks.yml b/.github/workflows/luarocks.yml index c0ec8bc..06ae552 100644 --- a/.github/workflows/luarocks.yml +++ b/.github/workflows/luarocks.yml @@ -12,7 +12,7 @@ jobs: name: upload steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: leafo/gh-actions-lua@v10 with: luaVersion: "5.1" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0569db8..cc8f4f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ jobs: release: name: create gh release runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' + if: ${{ github.ref == 'refs/heads/master' }} steps: - name: Create github release uses: softprops/action-gh-release@v1 diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 0bec04b..dff462a 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -11,7 +11,7 @@ jobs: name: check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: JohnnyMorganz/stylua-action@v2 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1927fc1..f06fd47 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: neovim_version: ['v0.9.0', 'nightly'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: date +%F > todays-date - name: Restore cache for today's nightly. uses: actions/cache@v2 diff --git a/doc/.gitkeep b/doc/.gitkeep new file mode 100644 index 0000000..e69de29