-
Notifications
You must be signed in to change notification settings - Fork 96
36 lines (36 loc) · 1.23 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Deploy docs
on:
push:
branches:
- main
- pr/** # just for testing
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: echo docs_dir=docs-build/${{ github.ref_name }} >> $GITHUB_ENV
- run: echo documentation directory=${{ env.docs_dir }}
- run: cargo install mdbook
- run: cargo install mdbook-variables --locked
- run: mkdir -p ${{ env.docs_dir }}
- run: |
export GITHUB_REF_NAME=${{ github.ref_name }}
[[ $GITHUB_REF_NAME = v* ]] && export QUILKIN_RELEASE=1
export QUILKIN_VERSION=$(make --directory=./build version --no-print-directory)
echo GITHUB_REF_NAME=${GITHUB_REF_NAME}
echo QUILKIN_VERSION=${QUILKIN_VERSION}
cd docs
mdbook build -d ../${{ env.docs_dir }}/book
- run: cargo doc --workspace --no-deps
- run: mv target/doc ${{ env.docs_dir }}/api
- uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs-build
CLEAN: false