Skip to content

Commit a9a3948

Browse files
authored
Merge pull request #3713 from ruby/add-css-ci-check
Added CSS build check by Actions
2 parents 19de7cf + ac8aee3 commit a9a3948

8 files changed

Lines changed: 1546 additions & 5904 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ jobs:
2929
with:
3030
ruby-version: ${{ matrix.ruby }}
3131
bundler-cache: true
32+
- name: Setup Node.js
33+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
34+
with:
35+
node-version: '22'
36+
cache: 'npm'
37+
- name: Install npm dependencies
38+
run: npm ci
39+
- name: Build CSS
40+
run: npm run build-css
3241
- name: Dump Ruby version
3342
run: ruby -v
3443
- name: Run tests

.github/workflows/jekyll.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ jobs:
2727
with:
2828
ruby-version: '3.2'
2929
bundler-cache: true
30+
- name: Setup Node.js
31+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
32+
with:
33+
node-version: '22'
34+
cache: 'npm'
35+
- name: Install npm dependencies
36+
run: npm ci
37+
- name: Build CSS
38+
run: npm run build-css
3039
- name: Setup Pages
3140
id: pages
3241
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ vendor
99
bin
1010
.jekyll*
1111
node_modules/
12-
package-lock.json
12+
stylesheets/compiled.css
1313
_figma/
1414
_svg-backup/

Rakefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,23 @@ CONFIG = "_config.yml"
1313

1414
task default: [:build]
1515

16+
desc "Build CSS with Tailwind"
17+
task :"build-css" do
18+
sh "npm run build-css"
19+
end
20+
1621
desc "Run tests (test-linter, lint, build)"
1722
task test: %i[test-news-plugin test-html-lang-plugin test-linter lint build]
1823

1924
desc "Build the Jekyll site"
20-
task :build do
25+
task build: :"build-css" do
2126
require "jekyll"
2227

2328
Jekyll::Commands::Build.process({})
2429
end
2530

2631
desc "Serve the Jekyll site locally"
27-
task :serve do
32+
task serve: :"build-css" do
2833
require "jekyll"
2934

3035
Jekyll::Commands::Serve.process({})

lib/linter.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ class Linter
1818
%r{\Aadmin/index\.md},
1919
%r{\A[^/]*/examples/},
2020
%r{\A_includes/},
21-
%r{\Atest/}
21+
%r{\Atest/},
22+
%r{\Anode_modules/}
2223
].freeze
2324

2425
WHITESPACE_EXCLUSIONS = [

0 commit comments

Comments
 (0)