From 991fd7a6d67ee017c57beaaa21fc31c4bee7944d Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Sat, 7 Oct 2023 06:48:07 +0800 Subject: feat(version): versions --- .github/workflows/pages.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to '.github/workflows/pages.yml') diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index ea8fddf0..6178331b 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -2,8 +2,13 @@ name: build Pages on: push: branches: - - master + - master - main + paths: + - "*.md" + - docs/** + - .github/workflows/pages.yml + permissions: contents: write jobs: @@ -14,7 +19,7 @@ jobs: - uses: actions/setup-python@v4 with: python-version: 3.x - - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - uses: actions/cache@v3 with: key: mkdocs-material-${{ env.cache_id }} @@ -23,4 +28,13 @@ jobs: mkdocs-material- - run: | pip install -r requirements.txt - mkdocs gh-deploy --force + pip install pdm + pdm install -G doc + + - name: Build Documentation + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git fetch origin gh-pages:gh-pages + cd docs && pdm run mike deploy --update-aliases dev + git push origin gh-pages -- cgit v1.2.3-70-g09d2