Skip to content

Commit c84839a

Browse files
committed
- added documentation generating workflow
1 parent 869306c commit c84839a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Generate Documentation
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
jobs:
13+
generateDocumentation:
14+
environment:
15+
name: github-pages
16+
url: ${{ steps.deployment.outputs.page_url }}
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
- uses: jiro4989/setup-nim-action@v1
22+
with:
23+
nim-version: '2.0.0'
24+
repo-token: ${{ secrets.GITHUB_TOKEN }}
25+
- run: nimble refresh
26+
- run: nimble install
27+
- name: Build documentation
28+
run: |
29+
nim doc --outdir:docs --index:on --git.url:https://github.com/amkrajewski/nimplex --git.commit:main --docInternal nimplex.nim
30+
cp docs/nimplex.html docs/index.html
31+
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v3
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v2
36+
with:
37+
path: 'docs'
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)