ci: 更新build

This commit is contained in:
Frederick Chen
2026-01-18 22:03:02 +08:00
committed by GitHub
parent 3bd6e57ed1
commit 12bf6cd80b

View File

@@ -1,31 +1,29 @@
# This is a basic workflow to help you get started with Actions name: ci
name: CI
# Controls when the workflow will run
on: on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push: push:
branches: [ "main" ] branches:
pull_request: - master
branches: [ "main" ] - main
permissions:
# Allows you to run this workflow manually from the Actions tab contents: write
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
# This workflow contains a single job called "build" deploy:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Configure Git Credentials
- name: Install mkdocs run: |
run: pip install mkdocs-material git config user.name github-actions[bot]
- name: Run mkdocs-depoly git config user.email 41898282+github-actions[bot]@users.noreply.github.com
run: mkdocs gh-deploy - 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