Skip to content

Commit 19188a7

Browse files
committed
build: update GitHub actions
1 parent af5ae3e commit 19188a7

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

.github/workflows/node-sass.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ name: CSS (node-sass)
22

33
on:
44
push:
5-
branches-ignore:
6-
- "dependabot/**"
5+
branches:
6+
- main
77
pull_request:
88
workflow_dispatch:
99

1010
env:
1111
FORCE_COLOR: 2
12-
NODE: 16
12+
NODE: 18
13+
14+
permissions:
15+
contents: read
1316

1417
jobs:
1518
css:
@@ -18,6 +21,8 @@ jobs:
1821
steps:
1922
- name: Clone repository
2023
uses: actions/checkout@v3
24+
with:
25+
persist-credentials: false
2126

2227
- name: Set up Node.js
2328
uses: actions/setup-node@v3
@@ -29,3 +34,16 @@ jobs:
2934
npx --package node-sass@latest node-sass --version
3035
npx --package node-sass@latest node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/ -o dist-sass/css/
3136
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

0 commit comments

Comments
 (0)