From d0c4a987f8a1bf1eb51101ef47a839d294253f4e Mon Sep 17 00:00:00 2001 From: neroist Date: Mon, 27 May 2024 14:00:08 -0400 Subject: [PATCH] add documenation generator workflow --- .github/workflows/docs.yml | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..0b5f2a0 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,42 @@ +name: generate-doc +run-name: Generate documentation + +on: + push: + branches: + - "main" + paths: + - "nimdoc.cfg" + - "libtray.nimble" + + - "src/**" + - ".github/workflows/**" + +jobs: + generate-doc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Nim + uses: jiro4989/setup-nim-action@v1 + with: + nim-version: stable + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate documentation + run: | + nimble doc src/libtray + + echo "" > htmldocs/index.html + + - name: Deploy to GitHub Pages + if: success() + uses: crazy-max/ghaction-github-pages@v3 + with: + build_dir: htmldocs + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + \ No newline at end of file