From 91372a1738ecd6925815353898e872f94ec5d0cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E5=BD=B1=E6=98=9F=E8=BE=B0?= <149694986+yeying-xingchen@users.noreply.github.com> Date: Sun, 26 Oct 2025 17:38:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?add:=20=E8=87=AA=E5=8A=A8=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto-build.yml | 50 ++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/auto-build.yml diff --git a/.github/workflows/auto-build.yml b/.github/workflows/auto-build.yml new file mode 100644 index 00000000..81b537de --- /dev/null +++ b/.github/workflows/auto-build.yml @@ -0,0 +1,50 @@ +name: Deploy to Pages + +on: + push: + branches: ['master'] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: 'pages' + cancel-in-progress: true + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: 'npm' + - name: Install yarn + run: npm install -g yarn + - name: Install dependencies + run: yarn + - name: Download status.json + run: wget https://mirrors.hust.edu.cn/status.json -P ./static/ + - name: Download config + run: wget -O docusaurus.config.js https://github.com/yeying-xingchen/hust-mirrors-gh-ppage/raw/refs/heads/main/docusaurus.config.js + - name: Build + run: yarn build + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v4 + with: + # Upload build repository + path: './build' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From 3a48faad2729d28ffc77fa5b617c9c97fb611ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E5=BD=B1=E6=98=9F=E8=BE=B0?= <149694986+yeying-xingchen@users.noreply.github.com> Date: Sun, 26 Oct 2025 17:45:11 +0800 Subject: [PATCH 2/2] Fix: a wrong site baseUrl configuration. --- .github/workflows/auto-build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/auto-build.yml b/.github/workflows/auto-build.yml index 81b537de..3251b41b 100644 --- a/.github/workflows/auto-build.yml +++ b/.github/workflows/auto-build.yml @@ -34,8 +34,6 @@ jobs: run: yarn - name: Download status.json run: wget https://mirrors.hust.edu.cn/status.json -P ./static/ - - name: Download config - run: wget -O docusaurus.config.js https://github.com/yeying-xingchen/hust-mirrors-gh-ppage/raw/refs/heads/main/docusaurus.config.js - name: Build run: yarn build - name: Setup Pages