Generate documentation in CI (#13)

* Also removes docs from master
This commit is contained in:
Tanguy 2022-05-12 17:23:28 +02:00 committed by GitHub
parent 24eb5e829e
commit 9d23c0bebe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 50 additions and 2059 deletions

48
.github/workflows/doc.yml vendored Normal file
View File

@ -0,0 +1,48 @@
name: Docgen
on:
push:
branches:
- master
- cidocs
workflow_dispatch:
jobs:
build:
timeout-minutes: 10
name: 'Generate & upload documentation'
runs-on: 'ubuntu-20.04'
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: 'stable'
- name: Generate doc
run: |
nim --version
nim buildDocs || true
- name: Clone the gh-pages branch
uses: actions/checkout@v2
with:
ref: gh-pages
path: subdoc
submodules: true
fetch-depth: 0
- name: Commit & push
run: |
rm -f subdoc/*
mv docs/* subdoc
cd subdoc
git add .
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name = "${{ github.actor }}"
git commit -a -m "update docs"
git push origin gh-pages

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
nimcache/
docs/

View File

@ -24,7 +24,7 @@ requires "unittest2"
## Usage
See [unittest2.html](https://status-im.github.io/nim-unittest2/docs/unittest2.html) documentation generated by `nim buildDocs`.
See [unittest2.html](https://status-im.github.io/nim-unittest2/unittest2.html) documentation generated by `nim buildDocs`.
Create a file that contains your unit tests:

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff