Skip to content

Commit 87cfc7e

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 87cfc7e

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
- uses: pnpm/action-setup@v6
16+
- uses: actions/setup-node@v6
17+
with:
18+
node-version-file: .nvmrc
19+
cache: pnpm
20+
- run: pnpm install --frozen-lockfile
21+
- run: pnpm build
22+
- run: node build/scripts/update-w3c-groups-list.js
23+
env:
24+
DATA_DIR: ${{ github.workspace }}/data
25+
- name: Commit changes
26+
run: |
27+
git config user.name "github-actions[bot]"
28+
git config user.email "github-actions[bot]@users.noreply.github.com"
29+
git add --force data/w3c/groups.json
30+
git diff --staged --quiet || git commit -m "chore: auto-update W3C groups list"
31+
git push

0 commit comments

Comments
 (0)