-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.5 KB
/
generate-icons.yml
File metadata and controls
57 lines (47 loc) · 1.5 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
# .github/workflows/generate-icons.yml
name: Generate Icons
on:
workflow_dispatch: {}
permissions:
contents: write
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Install Dependencies
run: |
npm install axios ajv ajv-formats
- name: Create Required Directories
run: |
mkdir -p data/components/icon
mkdir -p schemas
- name: Run Icon Generation Script
env:
FIGMA_ICONS_PROJECT_ID: ${{ secrets.FIGMA_ICONS_PROJECT_ID }}
FIGMA_ACCESS_KEY: ${{ secrets.FIGMA_ACCESS_KEY }}
run: node scripts/icons.script.js
- name: Debug - List generated content
run: |
echo "Contents of data/components/icon directory:"
ls -la data/components/icon/
- name: Validate JSON Files
run: |
for file in data/components/icon/*.json; do
if ! jq empty "$file" 2>/dev/null; then
echo "Error: Invalid JSON in $file"
exit 1
fi
done
- name: Commit and Push Changes
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add data/
git commit -m "Update icons" || echo "No changes to commit"
git push