File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,17 @@ name: CSS (node-sass)
2
2
3
3
on :
4
4
push :
5
- branches-ignore :
6
- - " dependabot/** "
5
+ branches :
6
+ - main
7
7
pull_request :
8
8
workflow_dispatch :
9
9
10
10
env :
11
11
FORCE_COLOR : 2
12
- NODE : 16
12
+ NODE : 18
13
+
14
+ permissions :
15
+ contents : read
13
16
14
17
jobs :
15
18
css :
18
21
steps :
19
22
- name : Clone repository
20
23
uses : actions/checkout@v3
24
+ with :
25
+ persist-credentials : false
21
26
22
27
- name : Set up Node.js
23
28
uses : actions/setup-node@v3
29
34
npx --package node-sass@latest node-sass --version
30
35
npx --package node-sass@latest node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/ -o dist-sass/css/
31
36
ls -Al dist-sass/css
37
+
38
+ - name : Check built CSS files for Sass variables
39
+ shell : bash
40
+ run : |
41
+ SASS_VARS_FOUND=$(find "dist-sass/css/" -type f -name "*.css" -print0 | xargs -0 --no-run-if-empty grep -F "\$" || true)
42
+ if [[ -z "$SASS_VARS_FOUND" ]]; then
43
+ echo "All good, no Sass variables found!"
44
+ exit 0
45
+ else
46
+ echo "Found $(echo "$SASS_VARS_FOUND" | wc -l | bc) Sass variables:"
47
+ echo "$SASS_VARS_FOUND"
48
+ exit 1
49
+ fi
You can’t perform that action at this time.
0 commit comments