Skip to content

(docs) minor improvements #66

(docs) minor improvements

(docs) minor improvements #66

name: Generate Documentation
on:
push:
paths:
- src/**
- docs/**
- '**/docs.nim'
- .github/workflows/documentation.yaml
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
generateDocumentation:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: '2.0.2'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: nimble refresh
- run: nimble install
- name: Build documentation
run: |
cd docs
nim c -r -d:ssl -d:changelogType=nim -d:user=amkrajewski -d:repo=nimcso getChangelog
cd ..
nim doc --project --index:on --outdir:docs --git.url:https://github.com/amkrajewski/nimCSO --git.commit:main src/nimcso
sed -i '0,/src\/nimcso/s//nimCSO/;0,/src\/nimcso/s//nimCSO/' docs/nimcso.html
cp docs/nimcso.html docs/index.html
mkdir -p docs/assets
cp -r paper/assets docs/assets
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4