-
Notifications
You must be signed in to change notification settings - Fork 127
45 lines (45 loc) · 1.47 KB
/
genai-frontmatter.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: genai front matter
on:
workflow_dispatch:
schedule:
- cron: "0 5 * * *"
pull_request:
paths:
- "docs/src/**/*.md"
- "docs/src/**/*.mdx"
jobs:
build:
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
fetch-depth: 10
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: yarn
- run: yarn install --frozen-lockfile
- name: compile
run: yarn compile
- name: front matter
run: yarn genai:frontmatter
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_TYPE: ${{ secrets.OPENAI_API_TYPE }}
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }}
- name: install sharp
run: cd docs && yarn add [email protected]
- name: docs
run: yarn build:docs
- name: gif diff
run: git diff --name-only
- uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: "docs/src/**/*.md docs/src/**/*.mdx"
commit_message: "[genai] front matter update"
commit_user_name: "genaiscript"