-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.34 KB
/
Copy pathdocs.yml
File metadata and controls
56 lines (47 loc) · 1.34 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
name: Documentation
on:
push:
branches: [main]
paths:
- "src/**"
- "docs/**"
- "scripts/**"
- "README.md"
- ".github/workflows/docs.yml"
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Cache Dependencies
uses: actions/cache@v3
with:
path: |
~/.deno
~/.cache/deno
key: ${{ runner.os }}-deno-${{ hashFiles('deno.lock') }}
restore-keys: |
${{ runner.os }}-deno-
- name: Install MkDocs
run: |
pip install mkdocs-material
pip install pymdown-extensions
- name: Generate API Documentation
run: |
deno run --allow-read --allow-write --allow-run --allow-env scripts/generate_docs.ts
- name: Build MkDocs Site
run: |
mkdocs build -f docs/site/mkdocs.yml -d site_build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site_build
publish_branch: gh-pages
full_commit_message: "docs: update documentation site (auto)"