From 12bf6cd80bfdb55db1b0a66a529d1d0a09a9b563 Mon Sep 17 00:00:00 2001 From: Frederick Chen Date: Sun, 18 Jan 2026 22:03:02 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=9B=B4=E6=96=B0build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yaml | 48 +++++++++++++++++------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1a40ce2..9e21b55 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,31 +1,29 @@ -# This is a basic workflow to help you get started with Actions - -name: CI - -# Controls when the workflow will run +name: ci on: - # Triggers the workflow on push or pull request events but only for the "main" branch push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel + branches: + - master + - main +permissions: + contents: write jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on + deploy: runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 - - - name: Install mkdocs - run: pip install mkdocs-material - - name: Run mkdocs-depoly - run: mkdocs gh-deploy + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v4 + with: + key: mkdocs-material-${{ env.cache_id }} + path: ~/.cache + restore-keys: | + mkdocs-material- + - run: pip install mkdocs-material + - run: mkdocs gh-deploy --force