-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (54 loc) · 1.79 KB
/
Copy pathrefresh-reference.yml
File metadata and controls
64 lines (54 loc) · 1.79 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Refresh Command Reference
# Regenerates docs/commands/ and docs/nightly.md from the latest npm
# release and the latest nightly prerelease, and commits to main only
# when the generated output changed (a new release, a new command, or a
# new flag). Runs after the vibium nightly publish finishes (~14:20 UTC).
on:
schedule:
- cron: '17 15 * * *'
workflow_dispatch:
permissions:
contents: write
actions: write
concurrency:
group: refresh-reference
cancel-in-progress: false
jobs:
refresh:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 22
- name: Regenerate the reference
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python3 scripts/gen_command_reference.py
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Build and test the site
run: |
make install
make build
make test
- name: Commit and deploy if changed
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git add docs site/public/commands.json site/public/skills site/public/.well-known
if git diff --cached --quiet; then
echo "Reference unchanged; nothing to commit."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "Refresh generated command reference"
git push
# Pushes made with GITHUB_TOKEN do not trigger the Pages
# workflow; dispatch it explicitly.
gh workflow run deploy-pages.yml --ref main