chore: build doc on PR
This commit is contained in:
parent
affa7d119c
commit
43849699e5
54
.github/workflows/pr-documentation.yml
vendored
Normal file
54
.github/workflows/pr-documentation.yml
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
name: Check Documentation
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
doc:
|
||||||
|
name: Build documentation
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
GO_VERSION: '1.21'
|
||||||
|
NODE_VERSION: '20.x'
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Go ${{ env.GO_VERSION }}
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: ${{ env.GO_VERSION }}
|
||||||
|
|
||||||
|
- name: Cache Go modules
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
# In order:
|
||||||
|
# * Module download cache
|
||||||
|
# * Build cache (Linux)
|
||||||
|
path: |
|
||||||
|
~/go/pkg/mod
|
||||||
|
~/.cache/go-build
|
||||||
|
key: docs-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
docs-${{ runner.os }}-go-
|
||||||
|
|
||||||
|
- run: go mod download
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ env.NODE_VERSION }}
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: docs/package-lock.json
|
||||||
|
|
||||||
|
- run: npm install --legacy-peer-deps
|
||||||
|
working-directory: ./docs
|
||||||
|
|
||||||
|
- name: Build Documentation
|
||||||
|
run: npm run build
|
||||||
|
working-directory: ./docs
|
Loading…
x
Reference in New Issue
Block a user