Skip to content

docs

docs #4

Workflow file for this run

name: docs
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
Docs:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
node_version:
- 18
node_arch:
- x64
cpp_arch:
- x64
env:
npm_config_zmq_draft: false
npm_config_zmq_shared: false
npm_config_arch: ${{ matrix.node_arch }}
npm_config_target_arch: ${{ matrix.node_arch }}
setup_node_arch: ${{ matrix.node_arch }}
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
./node_modules/
./build/
key:
# prettier-ignore
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch}}-ZMQ_DRAFT:${{env.npm_config_zmq_draft }}-Node:${{ matrix.node_version}}-${{hashFiles('./package.json') }}-docs"
restore-keys: |
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ env.npm_config_zmq_draft }}-Node:${{ matrix.node_version }}-"
- name: Env map
run: |
if [ "${{ matrix.node_arch }}" = "ia32" ]; then
echo "setup_node_arch=x86" > $GITHUB_ENV
fi
shell: bash
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
vcvarsall: ${{ contains(matrix.os, 'windows') }}
cmake: true
python: true
architecture: ${{ matrix.cpp_arch }}
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ env.setup_node_arch }}
- name: Build Documentation
run: |
pnpm install
pnpm run build.doc
- name: Deploy Documentation
uses: Cecilapp/GitHub-Pages-deploy@v3
with:
build_dir: docs
branch: gh-pages
email: ${{ github.actor }}@users.noreply.github.com
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}