Skip to content

Commit

Permalink
add documenation generator workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
neroist committed May 27, 2024
1 parent 4446b98 commit d0c4a98
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -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 "<!DOCTYPE html><html><head><meta http-equiv='Refresh' content='0; url=libtray.html'></head></html>" > 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 }}

0 comments on commit d0c4a98

Please sign in to comment.