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 : SVGR sync
2+
3+ on :
4+ pull_request :
5+ branches : ["main"]
6+ paths :
7+ - " assets/**"
8+ - " svgr-template.js"
9+ - " index-template.cjs"
10+ - " package.json"
11+
12+ jobs :
13+ svgr-check :
14+ name : SVGR in sync
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v4
18+
19+ - uses : pnpm/action-setup@v4
20+ with :
21+ version : 9
22+
23+ - uses : actions/setup-node@v4
24+ with :
25+ node-version : " 20"
26+ cache : " pnpm"
27+
28+ - name : Install dependencies
29+ run : pnpm install --frozen-lockfile
30+
31+ - name : Generate icon components from SVGs
32+ run : pnpm run svgr
33+
34+ - name : Check components in sync with assets
35+ run : |
36+ if ! git diff --exit-code src; then
37+ echo "::error::Generated icon components are out of sync with assets."
38+ echo ""
39+ echo "Run the following locally, then commit and push:"
40+ echo " pnpm run svgr"
41+ echo ""
42+ git diff --stat src
43+ exit 1
44+ fi
You can’t perform that action at this time.
0 commit comments