Skip to content

Commit dd2e967

Browse files
committed
feat: add GitHub Actions workflow to auto-update W3C groups list
Adds weekly scheduled workflow that runs update-w3c-groups-list script and commits changes if any groups were added or removed. Closes #395
1 parent 39ce491 commit dd2e967

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Update W3C groups list
2+
on:
3+
schedule:
4+
- cron: '23 3 * * 1' # Weekly on Monday at 03:23 UTC
5+
workflow_dispatch: # Allow manual trigger
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
update:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
with:
16+
ref: main
17+
- uses: pnpm/action-setup@v6
18+
- uses: actions/setup-node@v6
19+
with:
20+
node-version-file: .nvmrc
21+
cache: pnpm
22+
- run: pnpm install --frozen-lockfile
23+
- run: pnpm build
24+
- run: node build/scripts/update-w3c-groups-list.js
25+
env:
26+
DATA_DIR: ${{ github.workspace }}/data
27+
- name: Commit changes
28+
run: |
29+
git config user.name "github-actions[bot]"
30+
git config user.email "github-actions[bot]@users.noreply.github.com"
31+
git add --force data/w3c/groups.json
32+
git diff --staged --quiet || git commit -m "chore: auto-update W3C groups list"
33+
git push

0 commit comments

Comments
 (0)