mirror of
https://gitee.com/huanghongxun/HMCL-docs.git
synced 2026-05-05 01:55:27 +08:00
Compare commits
2 Commits
c24535d7d9
...
4391943d97
| Author | SHA1 | Date | |
|---|---|---|---|
| 4391943d97 | |||
| 81ae1ac9a3 |
38
.drone.yml
38
.drone.yml
@ -5,23 +5,33 @@ name: default
|
|||||||
clone:
|
clone:
|
||||||
depth: 1
|
depth: 1
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- pages
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: deploy
|
- name: build
|
||||||
image: alpine:3.23.2
|
image: ruby:3.4
|
||||||
volumes:
|
environment:
|
||||||
- name: site
|
JEKYLL_ENV: production
|
||||||
path: /site
|
BUNDLE_PATH: vendor/bundle
|
||||||
commands:
|
commands:
|
||||||
- rm -rf /site/*
|
- bundle config mirror.https://rubygems.org https://mirrors.cloud.tencent.com/rubygems
|
||||||
- mv ./* /site/
|
- bundle install --verbose
|
||||||
|
- bundle exec jekyll build --trace --verbose
|
||||||
|
volumes:
|
||||||
|
- name: dist
|
||||||
|
path: /drone/src/_site
|
||||||
|
- name: vendor
|
||||||
|
path: /drone/src/vendor
|
||||||
|
- name: jekyll-cache
|
||||||
|
path: /drone/src/.jekyll-cache
|
||||||
|
when:
|
||||||
|
branch: [main]
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: site
|
- name: dist
|
||||||
host:
|
host:
|
||||||
path: /home/ubuntu/docs.hmcl.net/www
|
path: /home/ubuntu/docs.hmcl.net/www
|
||||||
|
- name: vendor
|
||||||
|
host:
|
||||||
|
path: /home/ubuntu/docs.hmcl.net/cache/vendor
|
||||||
|
- name: jekyll-cache
|
||||||
|
host:
|
||||||
|
path: /home/ubuntu/docs.hmcl.net/cache/jekyll-cache
|
||||||
|
|||||||
40
.github/workflows/build.yml
vendored
40
.github/workflows/build.yml
vendored
@ -1,40 +0,0 @@
|
|||||||
name: Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
env:
|
|
||||||
JEKYLL_ENV: production
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
if: ${{ github.repository_owner == 'HMCL-dev' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Setup Ruby
|
|
||||||
uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
|
||||||
ruby-version: "3.4"
|
|
||||||
bundler-cache: true
|
|
||||||
cache-version: main
|
|
||||||
- name: Build
|
|
||||||
run: bundle exec jekyll build --trace --config _config.yml,_config.drone.yml --destination /home/runner/site
|
|
||||||
- name: Deploy to pages branch
|
|
||||||
working-directory: /home/runner/site
|
|
||||||
run: |
|
|
||||||
git init
|
|
||||||
git checkout --orphan pages
|
|
||||||
git config user.name "github-actions[bot]"
|
|
||||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
||||||
git add .
|
|
||||||
git commit -m "deploy: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
|
|
||||||
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
|
||||||
git push origin pages --force
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
footer:
|
|
||||||
links:
|
|
||||||
- label: Github
|
|
||||||
icon: fab fa-fw fa-github
|
|
||||||
url: https://github.com/HMCL-dev/HMCL
|
|
||||||
- label: 粤ICP备18071565号
|
|
||||||
url: https://beian.miit.gov.cn
|
|
||||||
@ -270,6 +270,8 @@ footer:
|
|||||||
- label: Github
|
- label: Github
|
||||||
icon: fab fa-fw fa-github
|
icon: fab fa-fw fa-github
|
||||||
url: https://github.com/HMCL-dev/HMCL
|
url: https://github.com/HMCL-dev/HMCL
|
||||||
|
- label: 粤ICP备18071565号
|
||||||
|
url: https://beian.miit.gov.cn
|
||||||
# since:
|
# since:
|
||||||
|
|
||||||
# minimal-mistakes (with jekyll-paginate-v2) https://github.com/sverrirs/jekyll-paginate-v2/blob/master/README-GENERATOR.md#site-configuration
|
# minimal-mistakes (with jekyll-paginate-v2) https://github.com/sverrirs/jekyll-paginate-v2/blob/master/README-GENERATOR.md#site-configuration
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user