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
3
3
on :
4
4
push :
5
5
paths :
6
- - " public/data /**"
6
+ - " snippets /**"
7
7
8
8
permissions :
9
9
contents : write
@@ -25,14 +25,19 @@ jobs:
25
25
run : |
26
26
npm install
27
27
28
- - name : Consolidate JSON files
28
+ - name : Consolidate Snippets into JSON files
29
29
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
31
35
32
36
- name : Commit and push changes
33
37
run : |
34
38
git config --global user.name "GitHub Action"
35
39
git config --global user.email "[email protected] "
40
+ git add public/data/*
36
41
git add public/consolidated/all_snippets.json
37
42
git commit -m "Update consolidated snippets"
38
43
git push
You can’t perform that action at this time.
0 commit comments