From 1320683ac39ee94db6c8a3b28db9c855a90565d6 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Mon, 12 Oct 2020 17:15:01 -0700 Subject: [PATCH 1/2] CI: run docs, publish docs --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ fusion.nimble | 2 +- readme.md | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb98ed4b..82b37902 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -181,3 +181,23 @@ jobs: run: | cd fusion nimble test + + - name: docs + run: | + cd fusion + nimble docs + + - name: Deploy docs + # to view docs on your own fork: push a gh-pages branch on your fork, + # enable gh-pages in your fork + # and remove `github.ref == 'refs/heads/master'` below + if: | + github.event_name == 'push' && github.ref == 'refs/heads/master' && + matrix.target.os == 'linux' && matrix.target.cpu == 'amd64' && + matrix.branch == 'devel' + uses: crazy-max/ghaction-github-pages@v1 + with: + build_dir: fusion/htmldocs + target_branch: gh-pages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/fusion.nimble b/fusion.nimble index 877a33f2..2ca2341e 100644 --- a/fusion.nimble +++ b/fusion.nimble @@ -13,4 +13,4 @@ requires "nim >= 1.0.0" task docs, "": # can customize, eg: # exec "nim r src/fusion/docutils " & srcDir & " --outdir:htmldocs2 -d:foo" - exec "nim r src/fusion/docutils " & srcDir + exec "nim c -r src/fusion/docutils " & srcDir diff --git a/readme.md b/readme.md index 4dd82065..85e64c95 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,5 @@ # Nim Fusion +docs: https://nim-lang.github.io/fusion/theindex.html Fusion contains Nim modules that are to be bundled with the Nim installation in order to give us something like the "Nim distribution". Fusion fullfills multiple purposes: From 36d600b0e4f7e6de7b677ff49ee97970dc73c049 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Mon, 12 Oct 2020 18:23:22 -0700 Subject: [PATCH 2/2] fixup --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82b37902..55a116e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -183,6 +183,7 @@ jobs: nimble test - name: docs + if: matrix.branch == 'devel' run: | cd fusion nimble docs