优化构建流程 (#271)
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
neveler 2025-10-06 09:53:20 +08:00 committed by GitHub
parent ec828e45f5
commit b317537789
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 32 additions and 2224 deletions

View File

@ -7,22 +7,20 @@ clone:
steps:
- name: build
image: jekyll/jekyll:4.2.2
image: ruby:3.4
environment:
JEKYLL_ENV: production
BUNDLE_PATH: vendor/bundle
commands:
- touch Gemfile.lock
- chmod a+w Gemfile.lock
- chown -R jekyll:jekyll /drone
- gem sources --add https://mirrors.cloud.tencent.com/rubygems/ --remove https://rubygems.org/
- bundle config mirror.https://rubygems.org https://mirrors.cloud.tencent.com/rubygems
- bundle install
- bundle install --verbose
- bundle exec jekyll build --trace --verbose
- bash scripts/copy_index_json.sh
volumes:
- name: dist
path: /drone/src/_site
- name: cache
- name: vendor
path: /drone/src/vendor
- name: jekyll-cache
path: /drone/src/.jekyll-cache
when:
branch: [main]
@ -31,6 +29,9 @@ volumes:
- name: dist
host:
path: /home/ubuntu/docs.hmcl.net/www
- name: cache
- name: vendor
host:
path: /home/ubuntu/docs.hmcl.net/cache
path: /home/ubuntu/docs.hmcl.net/cache/vendor
- name: jekyll-cache
host:
path: /home/ubuntu/docs.hmcl.net/cache/jekyll-cache

37
Gemfile
View File

@ -1,4 +1,4 @@
source "https://gems.ruby-china.com"
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
@ -7,32 +7,29 @@ source "https://gems.ruby-china.com"
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 4.2.2"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minimal-mistakes-jekyll"
gem "logger", "1.4.2"
gem "jekyll", "4.4.1"
gem "minimal-mistakes-jekyll", "4.27.3"
group :jekyll_plugins do
gem "jekyll-paginate"
gem "jekyll-sitemap"
gem "jekyll-gist"
gem "jekyll-feed"
gem "jemoji"
gem "jekyll-include-cache"
gem "jekyll-algolia"
gem "jekyll-remote-theme"
gem "jekyll-archives"
gem "jekyll-seo-tag"
gem "jekyll-paginate", "1.1.0"
gem "jekyll-sitemap", "1.4.0"
gem "jekyll-gist", "1.5.0"
gem "jekyll-feed", "0.17.0"
gem "jemoji", "0.13.0"
gem "jekyll-include-cache", "0.2.1"
gem "jekyll-algolia", "1.7.1"
gem "jekyll-archives", "2.3.0"
gem "jekyll-seo-tag", "2.8.0"
end
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo"
gem "tzinfo-data"
platforms :windows, :jruby do
gem "tzinfo", "2.0.6"
gem "tzinfo-data", "1.2025.2"
end
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
gem "wdm", "0.2.0", :platforms => [:windows]
gem "webrick", "~> 1.7"
gem "http_parser.rb", "0.8.0", :platforms => [:jruby]

View File

@ -18,7 +18,6 @@
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
remote_theme: "mmistakes/minimal-mistakes@4.26.2"
minimal_mistakes_skin: "default" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise"
minimal_mistakes_skin_dark: "dark" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise"
locale: "zh-CN"
@ -34,7 +33,7 @@ copyright_url: https://github.com/huanghongxun
breadcrumbs: true
# Build settings
#theme: minimal-mistakes-jekyll
theme: minimal-mistakes-jekyll
plugins:
- jekyll-paginate
- jekyll-sitemap
@ -42,7 +41,6 @@ plugins:
- jekyll-feed
- jemoji
- jekyll-include-cache
- jekyll-remote-theme
- jekyll-archives
- jekyll-seo-tag
@ -123,6 +121,9 @@ compress_html:
sass:
style: compressed
quiet_deps: true
silence_deprecations:
- import
head_scripts:
- /assets/js/theme.js

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
ROOT=$(dirname $0)/../
cd $ROOT
cp index.json _site/index.json