-
Notifications
You must be signed in to change notification settings - Fork 15
44 lines (42 loc) · 1.22 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
name: Docs publish
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20.12.0 ]
steps:
- uses: oleksiyrudenko/gha-git-credentials@v2-latest
with:
global: true
name: 'Github CI'
email: '[email protected]'
token: '${{ secrets.GITHUB_TOKEN }}'
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Run build
run: npm run build
- name: Generate docs and write files to ./docs
run: npm run docs
- name: Commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add docs/ -f
git commit -m "Updated docs" -a
- name: Push changes to docs branch
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: docs
force: true