Skip to content

Commit cb827b5

Browse files
CopilotDRSDavidSoft
andcommitted
Include minified CSS in repository and add CI verification
- Remove css/ from .gitignore to commit minified CSS for GitHub Pages - Ignore only CSS source maps (css/*.map) - Add CI step to verify committed CSS matches SCSS source - Ensures CSS is always kept up to date with SCSS changes Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
1 parent ce85a4e commit cb827b5

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,21 @@ jobs:
2929
- name: Build CSS
3030
run: npm run build:css
3131

32+
- name: Verify CSS is up to date
33+
run: |
34+
# Check if the built CSS matches what's committed
35+
if ! git diff --quiet css/main.min.css; then
36+
echo "❌ Error: css/main.min.css is out of date!"
37+
echo "The committed minified CSS doesn't match the SCSS source."
38+
echo ""
39+
echo "Please run 'npm run build:css' and commit the updated CSS file."
40+
echo ""
41+
echo "Differences found:"
42+
git diff css/main.min.css
43+
exit 1
44+
fi
45+
echo "✅ CSS is up to date with SCSS source"
46+
3247
- name: Set up Ruby
3348
uses: ruby/setup-ruby@v1
3449
with:

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Gemfile.lock
2020
node_modules/
2121
package-lock.json
2222

23-
# Generated CSS
24-
css/
23+
# Generated CSS source maps (keep the minified CSS for GitHub Pages)
24+
css/*.map
2525

2626
# =========================
2727
# Operating System Files

css/main.min.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.

0 commit comments

Comments
 (0)