Skip to content

Commit b317537

Browse files
authored
优化构建流程 (#271)
1 parent ec828e4 commit b317537

File tree

5 files changed

+32
-2224
lines changed

5 files changed

+32
-2224
lines changed

.drone.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,20 @@ clone:
77

88
steps:
99
- name: build
10-
image: jekyll/jekyll:4.2.2
10+
image: ruby:3.4
1111
environment:
1212
JEKYLL_ENV: production
13+
BUNDLE_PATH: vendor/bundle
1314
commands:
14-
- touch Gemfile.lock
15-
- chmod a+w Gemfile.lock
16-
- chown -R jekyll:jekyll /drone
17-
- gem sources --add https://mirrors.cloud.tencent.com/rubygems/ --remove https://rubygems.org/
1815
- bundle config mirror.https://rubygems.org https://mirrors.cloud.tencent.com/rubygems
19-
- bundle install
16+
- bundle install --verbose
2017
- bundle exec jekyll build --trace --verbose
21-
- bash scripts/copy_index_json.sh
2218
volumes:
2319
- name: dist
2420
path: /drone/src/_site
25-
- name: cache
21+
- name: vendor
22+
path: /drone/src/vendor
23+
- name: jekyll-cache
2624
path: /drone/src/.jekyll-cache
2725
when:
2826
branch: [main]
@@ -31,6 +29,9 @@ volumes:
3129
- name: dist
3230
host:
3331
path: /home/ubuntu/docs.hmcl.net/www
34-
- name: cache
32+
- name: vendor
3533
host:
36-
path: /home/ubuntu/docs.hmcl.net/cache
34+
path: /home/ubuntu/docs.hmcl.net/cache/vendor
35+
- name: jekyll-cache
36+
host:
37+
path: /home/ubuntu/docs.hmcl.net/cache/jekyll-cache

Gemfile

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
source "https://gems.ruby-china.com"
1+
source "https://rubygems.org"
22
# Hello! This is where you manage which Jekyll version is used to run.
33
# When you want to use a different version, change it below, save the
44
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
@@ -7,32 +7,29 @@ source "https://gems.ruby-china.com"
77
#
88
# This will help ensure the proper Jekyll version is running.
99
# Happy Jekylling!
10-
gem "jekyll", "~> 4.2.2"
11-
# This is the default theme for new Jekyll sites. You may change this to anything you like.
12-
gem "minimal-mistakes-jekyll"
13-
gem "logger", "1.4.2"
10+
gem "jekyll", "4.4.1"
11+
gem "minimal-mistakes-jekyll", "4.27.3"
1412

1513
group :jekyll_plugins do
16-
gem "jekyll-paginate"
17-
gem "jekyll-sitemap"
18-
gem "jekyll-gist"
19-
gem "jekyll-feed"
20-
gem "jemoji"
21-
gem "jekyll-include-cache"
22-
gem "jekyll-algolia"
23-
gem "jekyll-remote-theme"
24-
gem "jekyll-archives"
25-
gem "jekyll-seo-tag"
14+
gem "jekyll-paginate", "1.1.0"
15+
gem "jekyll-sitemap", "1.4.0"
16+
gem "jekyll-gist", "1.5.0"
17+
gem "jekyll-feed", "0.17.0"
18+
gem "jemoji", "0.13.0"
19+
gem "jekyll-include-cache", "0.2.1"
20+
gem "jekyll-algolia", "1.7.1"
21+
gem "jekyll-archives", "2.3.0"
22+
gem "jekyll-seo-tag", "2.8.0"
2623
end
2724

2825
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
2926
# and associated library.
30-
platforms :mingw, :x64_mingw, :mswin, :jruby do
31-
gem "tzinfo"
32-
gem "tzinfo-data"
27+
platforms :windows, :jruby do
28+
gem "tzinfo", "2.0.6"
29+
gem "tzinfo-data", "1.2025.2"
3330
end
3431

3532
# Performance-booster for watching directories on Windows
36-
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
33+
gem "wdm", "0.2.0", :platforms => [:windows]
3734

38-
gem "webrick", "~> 1.7"
35+
gem "http_parser.rb", "0.8.0", :platforms => [:jruby]

_config.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
# You can create any custom variable you would like, and they will be accessible
1919
# in the templates via {{ site.myvariable }}.
2020

21-
remote_theme: "mmistakes/minimal-mistakes@4.26.2"
2221
minimal_mistakes_skin: "default" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise"
2322
minimal_mistakes_skin_dark: "dark" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise"
2423
locale: "zh-CN"
@@ -34,15 +33,14 @@ copyright_url: https://github.com/huanghongxun
3433
breadcrumbs: true
3534

3635
# Build settings
37-
#theme: minimal-mistakes-jekyll
36+
theme: minimal-mistakes-jekyll
3837
plugins:
3938
- jekyll-paginate
4039
- jekyll-sitemap
4140
- jekyll-gist
4241
- jekyll-feed
4342
- jemoji
4443
- jekyll-include-cache
45-
- jekyll-remote-theme
4644
- jekyll-archives
4745
- jekyll-seo-tag
4846

@@ -123,6 +121,9 @@ compress_html:
123121

124122
sass:
125123
style: compressed
124+
quiet_deps: true
125+
silence_deprecations:
126+
- import
126127

127128
head_scripts:
128129
- /assets/js/theme.js

0 commit comments

Comments
 (0)