Skip to content

Commit 41e8e6a

Browse files
committed
ciで自動生成
1 parent ca80ab5 commit 41e8e6a

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Generate Question Examples
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'public/docs/**'
7+
8+
jobs:
9+
question-example:
10+
runs-on: ubuntu-latest
11+
# Push権限を付与
12+
permissions:
13+
contents: write
14+
15+
steps:
16+
- uses: actions/checkout@v6
17+
with:
18+
ref: ${{ github.head_ref }}
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
cache: 'npm'
23+
- run: npm ci
24+
25+
- run: npx tsx ./scripts/questionExample.ts 4
26+
env:
27+
API_KEY: ${{ secrets.API_KEY }}
28+
29+
- name: Commit and Push changes
30+
# 前のステップが成功・失敗どちらでも必ず実行
31+
if: always()
32+
run: |
33+
git config user.name "github-actions[bot]"
34+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
35+
git add .
36+
git diff --staged --exit-code || (git commit -m "[ci] generate question examples" && git push)

0 commit comments

Comments
 (0)