File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Regenerate API client
2+
3+ on :
4+ schedule :
5+ - cron : " 0 3 * * 5"
6+ workflow_dispatch :
7+
8+ jobs :
9+ gen-api :
10+ name : Regenerate API client
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : write
14+ pull-requests : write
15+
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+ with :
20+ token : ${{ secrets.CI_PAT }}
21+
22+ - name : Setup Bun
23+ uses : oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
24+ with :
25+ bun-version-file : " .bun-version"
26+
27+ - name : Install dependencies
28+ run : bun ci
29+
30+ - name : Generate files
31+ run : bun run gen
32+
33+ - name : Create or update Pull Request
34+ uses : peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
35+ with :
36+ token : ${{ secrets.CI_PAT }}
37+ commit-message : " feat: regenerate api client"
38+ title : " feat: regenerate api client"
39+ committer : CI <ci@rman.dev>
40+ author : CI <ci@rman.dev>
41+ branch : gen-api
42+ delete-branch : true
43+ assignees : gameroman
44+ reviewers : gameroman
45+ labels : ci
46+
47+ - name : Notify Discord
48+ if : always()
49+ uses : sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
50+ with :
51+ webhook : ${{ secrets.DISCORD_WEBHOOK }}
52+ status : ${{ job.status }}
53+ title : " Regenerate API client (#${{ github.run_number }})"
54+ description : |
55+ Status: **${{ job.status }}**
56+ Branch: ${{ github.ref_name }}
57+ Trigger: ${{ github.event_name }}
58+ Commit: ${{ github.sha }}
Original file line number Diff line number Diff line change 1- name : Update API
1+ name : Sync API docs
22
33on :
44 schedule :
5- - cron : " 0 3 * * 1"
6- - cron : " 0 3 * * 4"
7- - cron : " 0 3 * * 6"
5+ - cron : " 0 3 * * *"
86 workflow_dispatch :
97
108jobs :
11- update -api :
12- name : Update API
9+ sync -api-docs :
10+ name : Sync API docs
1311 runs-on : ubuntu-latest
1412 permissions :
1513 contents : write
@@ -41,36 +39,15 @@ jobs:
4139
4240 rm -rf lichess-api
4341
44- - name : Setup Bun
45- uses : oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
46- with :
47- bun-version-file : " .bun-version"
48-
49- - name : Install dependencies
50- run : bun ci
51-
52- - name : Generate files
53- run : bun run gen
54-
55- - name : Build
56- run : bun run build
57-
58- - name : Typecheck code
59- run : bun run typecheck
60-
61- - name : Run tests
62- run : bun run test
63-
6442 - name : Create or update Pull Request
6543 uses : peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
6644 with :
6745 token : ${{ secrets.CI_PAT }}
68- commit-message : " ci: update api"
69- title : " ci: update api"
46+ commit-message : " chore: sync api docs "
47+ title : " chore: sync api docs "
7048 committer : CI <ci@rman.dev>
7149 author : CI <ci@rman.dev>
72- body : Update API
73- branch : update-api
50+ branch : sync-api-docs
7451 delete-branch : true
7552 assignees : gameroman
7653 reviewers : gameroman
8259 with :
8360 webhook : ${{ secrets.DISCORD_WEBHOOK }}
8461 status : ${{ job.status }}
85- title : " Update API (#${{ github.run_number }})"
62+ title : " Sync API docs (#${{ github.run_number }})"
8663 description : |
8764 Status: **${{ job.status }}**
8865 Branch: ${{ github.ref_name }}
You can’t perform that action at this time.
0 commit comments