File tree Expand file tree Collapse file tree 2 files changed +31
-3
lines changed Expand file tree Collapse file tree 2 files changed +31
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Checks snippets syntax
2+
3+ on :
4+ pull_request :
5+ paths :
6+ - ' snippets/**'
7+
8+ jobs :
9+ check-snippets :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout repository
14+ uses : actions/checkout@v3
15+
16+ - name : Set up Node.js
17+ uses : actions/setup-node@v3
18+ with :
19+ node-version : " 16"
20+
21+ - name : Check if snippets are formated correctly
22+ run : |
23+ node utils/checkSnippetFormatting.js # Run the script located in the utils/ folder
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Consolidate JSON Files
33on :
44 push :
55 paths :
6- - " public/data /**"
6+ - " snippets /**"
77
88permissions :
99 contents : write
@@ -25,14 +25,19 @@ jobs:
2525 run : |
2626 npm install
2727
28- - name : Consolidate JSON files
28+ - name : Consolidate Snippets into JSON files
2929 run : |
30- node utils/consolidate.js # Run the script located in the utils/ folder
30+ node utils/consolidateSnippets.js # Run the script located in the utils/ folder
31+
32+ - name : Consolidate JSON files into merged file
33+ run : |
34+ node utils/consolidate.js
3135
3236 - name : Commit and push changes
3337 run : |
3438 git config --global user.name "GitHub Action"
3539 git config --global user.email "action@github.com"
40+ git add public/data/*
3641 git add public/consolidated/all_snippets.json
3742 git commit -m "Update consolidated snippets"
3843 git push
You can’t perform that action at this time.
0 commit comments