fix regex of version tag, build project doc (#27)

This commit is contained in:
Xie Yanbo 2021-02-08 17:21:39 +08:00 committed by GitHub
parent 6cf9f7f938
commit addc3a6f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 8 deletions

View File

@ -4,14 +4,14 @@ name: website
on:
push:
tags:
- 'v*.*.*'
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF:10}
@ -27,7 +27,7 @@ jobs:
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-stable
- uses: jiro4989/setup-nim-action@v1.0.2
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: 'stable'
- name: Install libsnappy
@ -48,14 +48,11 @@ jobs:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: |
# Due to bug https://github.com/nim-lang/Nim/issues/14281, compile the documentation separately.
#nimble doc --project --git.url:https://github.com/$GITHUB_REPOSITORY --git.commit:$RELEASE_VERSION src/leveldb.nim
nimble doc --git.url:https://github.com/$GITHUB_REPOSITORY --git.commit:$RELEASE_VERSION src/leveldb.nim
nimble doc --git.url:https://github.com/$GITHUB_REPOSITORY --git.commit:$RELEASE_VERSION src/leveldb/raw.nim
nimble doc --project --git.url:https://github.com/$GITHUB_REPOSITORY --git.commit:$RELEASE_VERSION src/leveldb.nim
find .
# Deploying documentation of the latest version.
mkdir -p ./public
mv leveldb.html raw.html nimdoc.out.css ./public/
mv src/htmldocs/* public/
cd ./public/
ln -s ./leveldb.html index.html
cd ../