-
-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (40 loc) · 1.12 KB
/
deploy-api-docs.yml
File metadata and controls
42 lines (40 loc) · 1.12 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
name: Deploy Api Docs
on:
push:
paths:
- 'src/**/*.ts'
branches:
- main
jobs:
deploy:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
cache: 'npm'
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Build api docs
run: npm run docs:api
- name: Update gh-pages branch
run: |
git config --global user.email "nandor.kraszlan@gmail.com"
git config --global user.name "Nandor Kraszlan"
rm -rf types/
cp -r ./api-docs/* ./
git add -f assets
git add -f classes
git add -f interfaces
git add -f functions
git add -f types
touch .nojekyll
git add -f .nojekyll
git add -f index.html
git add -f modules.html
git fetch
git switch gh-pages
git commit -m "Updates from ${{ github.ref }} - {{ github.sha }}" --no-verify
git merge origin/main
git push