2020-12-21 09:47:37 +00:00
|
|
|
name: docs
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-12-21 09:55:07 +00:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
# We need to do this because of how github cache works
|
|
|
|
# I am not sure we can move the cache file, so if we do not do this
|
|
|
|
# make update breaks because the cached compiler is there where the submodules
|
|
|
|
# are meant to go.
|
|
|
|
- name: Submodules
|
|
|
|
run: |
|
|
|
|
git submodule update --init --recursive
|
|
|
|
- name: Cache nim
|
|
|
|
uses: actions/cache@v1
|
2020-12-21 09:47:37 +00:00
|
|
|
with:
|
2020-12-21 09:55:07 +00:00
|
|
|
path: vendor/nimbus-build-system/vendor/Nim/bin
|
2020-12-21 09:57:02 +00:00
|
|
|
key: ${{ runner.os }}-2-nim-${{ hashFiles('.gitmodules') }}
|
2020-12-21 09:55:07 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2020-12-21 09:56:51 +00:00
|
|
|
make -j2 NIMFLAGS="--parallelBuild:2" V=1 update
|
|
|
|
make -j2 NIMFLAGS="--parallelBuild:2" LOG_LEVEL=TRACE
|
2020-12-21 11:34:30 +00:00
|
|
|
- name: Generate docs
|
2020-12-21 11:31:12 +00:00
|
|
|
run: |
|
|
|
|
make -j2 NIMFLAGS="--parallelBuild:2" V=1 docs
|
2020-12-21 09:47:37 +00:00
|
|
|
- name: Deploy documents
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
publish_dir: ${{ env.deploy-dir }}
|