HMCL-docs/.drone.yml
neveler b67062aee9
All checks were successful
continuous-integration/drone/push Build is passing
构建时使用 JEKYLL_ENV=production 环境变量 (#264)
2025-10-03 12:44:00 +08:00

37 lines
822 B
YAML

kind: pipeline
type: docker
name: default
clone:
depth: 1
steps:
- name: build
image: jekyll/jekyll:4.2.2
environment:
JEKYLL_ENV: production
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 exec jekyll build --trace --verbose
- bash scripts/copy_index_json.sh
volumes:
- name: dist
path: /drone/src/_site
- name: cache
path: /drone/src/.jekyll-cache
when:
branch: [main]
volumes:
- name: dist
host:
path: /home/ubuntu/docs.hmcl.net/www
- name: cache
host:
path: /home/ubuntu/docs.hmcl.net/cache