From 81ae1ac9a3c53077217ef9ff9344090c550d9f38 Mon Sep 17 00:00:00 2001 From: Huang Yuhui Date: Tue, 17 Mar 2026 00:57:55 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E5=B0=86=E7=AB=99=E7=82=B9=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E8=BF=81=E7=A7=BB=E8=87=B3=20GitHub=20Actions=20(#400?= =?UTF-8?q?)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 34b9692db74f29ba422f0ba1a77fcea03d84c6ee. --- .drone.yml | 44 +++++++++++++++++++++++-------------- .github/workflows/build.yml | 40 --------------------------------- 2 files changed, 27 insertions(+), 57 deletions(-) delete mode 100644 .github/workflows/build.yml diff --git a/.drone.yml b/.drone.yml index 4012a7e..5a9165a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,23 +5,33 @@ name: default clone: depth: 1 -trigger: - branch: - - pages - event: - - push - steps: - - name: deploy - image: alpine:3.23.2 - volumes: - - name: site - path: /site - commands: - - rm -rf /site/* - - mv ./* /site/ +- name: build + image: ruby:3.4 + environment: + JEKYLL_ENV: production + BUNDLE_PATH: vendor/bundle + commands: + - bundle config mirror.https://rubygems.org https://mirrors.cloud.tencent.com/rubygems + - bundle install --verbose + - bundle exec jekyll build --trace --verbose --config _config.yml,_config.drone.yml + 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: - - name: site - host: - path: /home/ubuntu/docs.hmcl.net/www +- name: dist + host: + 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 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index ff4d04f..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -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