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