-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (32 loc) · 1003 Bytes
/
question-example.yml
File metadata and controls
37 lines (32 loc) · 1003 Bytes
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
name: Generate Question Examples
on:
pull_request:
branches: [ "main" ]
# paths:
# - 'public/docs/**'
jobs:
question-example:
runs-on: ubuntu-latest
# Push権限を付与
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npx tsx ./scripts/questionExample.ts 4
env:
API_KEY: ${{ secrets.API_KEY }}
- name: Commit and Push changes
# 前のステップが成功・失敗どちらでも必ず実行
if: always()
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git diff --staged --exit-code || (git commit -m "[ci] generate question examples" && git push)