Skip to content

Generate documentation #7

Generate documentation

Generate documentation #7

Workflow file for this run

name: generate-doc
run-name: Generate documentation
on:
push:
branches:
- "main"
paths:
- "nimdoc.cfg"
- "libtray.nimble"
- "src/**"
- ".github/workflows/**"
workflow_dispatch:
jobs:
generate-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Nim
uses: jiro4989/setup-nim-action@v1.5.0
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@v4
with:
build_dir: htmldocs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}