-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.13 KB
/
documetation.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
name: Deploy TypeDoc Documentation on Tag
on:
push:
tags:
- 'v*'
jobs:
generate-and-deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- run: npm ci
- run: npm run test
- run: npm run docs
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit and push documentation to documentation branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git fetch --all
git checkout -B documentation
git reset --hard origin/main
find . -maxdepth 1 -not -path './.git' -not -path './docs' -not -path '.' -not -path '..' -exec rm -rf {} +
mv docs/* .
mv docs/*. .
rmdir docs
git add --all
git commit -m "Deploy TypeDoc documentation for tag ${{ github.ref_name }}"
git push origin documentation --force