Skip to content

Commit d358ce8

Browse files
committed
Use Middleman external pipeline for Tailwind
Remove CI step that ran tailwindcss during deploy and rely on the external_pipeline configured in config.rb Commit the generated source/stylesheets/site.css and remove it from .gitignore
1 parent 4adafb9 commit d358ce8

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ jobs:
2727
with:
2828
bundler-cache: true
2929

30-
- name: Generate Tailwind CSS
31-
run: bundle exec tailwindcss -i source/stylesheets/tailwind.css -o source/stylesheets/site.css --minify
32-
33-
- name: Build site with Middleman
30+
- name: Build site
3431
run: bundle exec middleman build
3532

3633
- name: Setup Pages

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
.DS_Store
44
build/
55
.tmp/
6-
source/stylesheets/site.css

config.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
# https://middlemanapp.com/advanced/configuration/#environment-specific-settings
55
set :url_root, @app.data.site.host
66

7+
activate :external_pipeline,
8+
name: :tailwindcss,
9+
command: build? ? 'tailwindcss -i source/stylesheets/tailwind.css -o source/stylesheets/site.css --minify' : 'tailwindcss -i source/stylesheets/tailwind.css -o source/stylesheets/site.css --watch --minify',
10+
source: 'source',
11+
latency: 1
12+
713
activate :livereload
814
activate :i18n,
915
mount_at_root: :en,
1016
lang_map: { fr: :acp, de: :solawi }
1117

1218
configure :development do
1319
set :debug_assets, true
14-
15-
activate :external_pipeline,
16-
name: :tailwindcss,
17-
command: 'tailwindcss -i source/stylesheets/tailwind.css -o source/stylesheets/site.css --watch',
18-
source: 'source',
19-
latency: 1
2020
end
2121

2222
configure :build do

0 commit comments

Comments
 (0)