Skip to content

Commit 3da3037

Browse files
committed
ciで自動生成
1 parent ca80ab5 commit 3da3037

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

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

0 commit comments

Comments
 (0)