-
Notifications
You must be signed in to change notification settings - Fork 26
61 lines (59 loc) · 1.7 KB
/
docs.yaml
File metadata and controls
61 lines (59 loc) · 1.7 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: docs
on:
push:
branches:
- main
paths:
- 'LICENSE'
- 'README.md'
- 'typedoc.js'
- '**/LICENSE'
- '**/README.md'
- '**/typedoc.js'
- '.github/workflows/**'
- 'modules/**/src/**/*.ts'
jobs:
update:
name: Update Docs
runs-on: ubuntu-24.04
container: node:24.14.1-trixie
permissions:
contents: write
steps:
- name: Checkout main
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
path: main
persist-credentials: false
- name: Checkout gh-pages
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: gh-pages
path: gh-pages
persist-credentials: true
- name: Build Docs
working-directory: main
run: |
set -x
export DEBIAN_FRONTEND=noninteractive
apt update --fix-missing
apt install -y --no-install-recommends \
openjdk-21-jdk libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
yarn --ignore-optional --ignore-engines --non-interactive
yarn tsc:build
yarn doc
- name: Copy Docs to gh-pages
run: |
rm -rf gh-pages/docs
cp -r main/doc gh-pages/docs
- name: Commit new docs
working-directory: gh-pages
run: |
COMMIT_SHA=$(echo "${COMMIT_SHA}" | cut -c 1-7)
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add --all
git commit --allow-empty -m "update docs from ${COMMIT_SHA}"
git push
env:
COMMIT_SHA: ${{ github.sha }}