Skip to content

Commit 0519358

Browse files
committed
update scss build
Signed-off-by: JSONthrytship <[email protected]>
1 parent 0dae4ba commit 0519358

File tree

7 files changed

+32
-124
lines changed

7 files changed

+32
-124
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,17 @@ jobs:
2222

2323
- name: Build SASS
2424
run: |
25+
# Make the build script executable
26+
chmod +x ./scripts/build-sass.sh
27+
28+
# Run the build script
2529
npm run sass:build
30+
31+
# Verify the build
32+
if [ ! -f "public/styles/main.css" ]; then
33+
echo "Error: main.css was not generated"
34+
exit 1
35+
fi
2636
2737
- name: Deploy to GitHub Pages
2838
uses: JamesIves/github-pages-deploy-action@v4

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"start": "node server.js",
88
"dev": "nodemon server.js",
99
"sass": "sass --watch public/styles/main.scss:public/styles/main.css public/weeks/*/style.scss:public/weeks/*/style.css",
10-
"sass:build": "sass public/styles/main.scss:public/styles/main.css public/weeks/*/style.scss:public/weeks/*/style.css --style compressed",
10+
"sass:build": "./scripts/build-sass.sh",
1111
"dev:all": "concurrently \"npm run dev\" \"npm run sass\""
1212
},
1313
"repository": {

public/styles/main.css

Lines changed: 1 addition & 122 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/styles/main.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/weeks/week1/style.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/weeks/week1/style.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/build-sass.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# Build main styles
4+
echo "Building main styles..."
5+
sass public/styles/main.scss:public/styles/main.css --style compressed
6+
7+
# Build week styles
8+
echo "Building week styles..."
9+
for week_dir in public/weeks/week*; do
10+
if [ -d "$week_dir" ] && [ -f "$week_dir/style.scss" ]; then
11+
week_name=$(basename "$week_dir")
12+
echo "Building $week_name styles..."
13+
sass "$week_dir/style.scss:$week_dir/style.css" --style compressed
14+
fi
15+
done
16+
17+
echo "SASS build complete!"

0 commit comments

Comments
 (0)