2022-05-04 21:22:05 +08:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
2022-05-04 18:29:47 +08:00
|
|
|
|
2022-05-04 21:38:52 +08:00
|
|
|
clone:
|
|
|
|
depth: 1
|
|
|
|
|
2022-05-04 21:22:05 +08:00
|
|
|
steps:
|
2022-05-04 21:38:52 +08:00
|
|
|
- name: build
|
2024-07-18 14:54:34 +08:00
|
|
|
image: jekyll/jekyll:4.2.2
|
2022-05-04 21:22:05 +08:00
|
|
|
commands:
|
|
|
|
- touch Gemfile.lock
|
|
|
|
- chmod a+w Gemfile.lock
|
|
|
|
- chown -R jekyll:jekyll /drone
|
2024-01-09 23:20:11 +08:00
|
|
|
- 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
|
2022-05-04 21:22:05 +08:00
|
|
|
- bundle install
|
2024-07-22 00:21:55 +08:00
|
|
|
- bundle exec jekyll build --trace --verbose
|
2022-05-04 23:00:22 +08:00
|
|
|
- bash scripts/copy_index_json.sh
|
2022-05-04 22:21:37 +08:00
|
|
|
volumes:
|
|
|
|
- name: dist
|
2022-05-04 22:25:13 +08:00
|
|
|
path: /drone/src/_site
|
2022-05-04 22:50:53 +08:00
|
|
|
- name: cache
|
|
|
|
path: /drone/src/.jekyll-cache
|
2022-05-04 23:58:35 +08:00
|
|
|
when:
|
|
|
|
branch: [main]
|
2022-05-04 21:22:05 +08:00
|
|
|
|
2022-05-04 22:21:37 +08:00
|
|
|
volumes:
|
|
|
|
- name: dist
|
|
|
|
host:
|
2022-05-04 23:58:35 +08:00
|
|
|
path: /home/ubuntu/docs.hmcl.net/www
|
2022-05-04 22:50:53 +08:00
|
|
|
- name: cache
|
|
|
|
host:
|
2022-05-04 23:01:44 +08:00
|
|
|
path: /home/ubuntu/docs.hmcl.net/cache
|