-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (46 loc) · 1.2 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: GitHub Pages documentation setup
on:
push:
branches:
- main
paths:
- src/**
- .github/workflows/docs.yml
workflow_dispatch:
jobs:
docs:
name: Setup documentation
runs-on: ubuntu-latest
steps:
# Checkout
- uses: actions/checkout@v4
with:
path: ./project/
submodules: true
- uses: actions/checkout@v4
with:
ref: docs
path: ./docs/
# Cleanup (docs)
- name: Clean documentation directory
working-directory: ./docs/
run: |
git rm --ignore-unmatch -rf .
git clean -fxd
# Generation (project)
- name: Install dependencies
working-directory: ./project/
run: npm ci
- name: Run TypeDoc
working-directory: ./project/
run: |
npx --yes typedoc --out ../docs src/Deputy.ts
# Commit
- name: Commit new documentation
uses: EndBug/add-and-commit@v9
with:
cwd: ./docs/
default_author: github_actions
add: "."
message: Updating documentation [${{ github.sha }}]
push: true