-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.18 KB
/
generate-doc.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
name: Generate doc
run-name: Generate doc
on:
push:
branches:
- develop
workflow_dispatch:
inputs:
docLevel:
description: "Doc level"
required: true
default: "beginner"
type: choice
options:
- beginner
- intermediate
docTitle:
description: "Doc title"
required: true
type: string
jobs:
update-doc:
runs-on: ubuntu-latest
env:
DOC_LEVEL: ${{ inputs.docLevel }}
DOC_TITLE: ${{ inputs.docTitle }}
AI: ${{ secrets.AI }}
GPT_MODEL: ${{ secrets.GPT_MODEL }}
GEMINI_KEY: ${{ secrets.GEMINI_KEY }}
GPT_URL: ${{ secrets.GPT_URL }}
GPT_KEY: ${{ secrets.GPT_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Run script:docs-file
run: npm run script:docs-file "${{ env.DOC_TITLE }}"
- name: Run script:docs-desc
run: npm run script:docs-desc
- name: Commit docs-desc
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "📃 docs(description): Generate description by chatGPT"