Skip to content

Commit

Permalink
更细化工作流 [no deploy]
Browse files Browse the repository at this point in the history
  • Loading branch information
FeignClaims committed Jan 28, 2024
1 parent 85b73f0 commit ed023f8
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: sync_to_gitee
name: deploy_to_gitee
on:
pull_request:
push:
branches:
- main

jobs:
build_doc:
build:
if: ${{ !contains(github.event.head_commit.message, '[no deploy]') }}
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down Expand Up @@ -35,15 +36,19 @@ jobs:
rm -rf build
sphinx-build source build
commit:
runs-on: ubuntu-latest
needs: build
steps:
- name: Commit changes
uses: EndBug/add-and-commit@v9.1.3
with:
default_author: github_actions
message: "[bot] Build gitee pages"

sync_and_publish:
sync:
runs-on: ubuntu-latest
needs: build_doc
needs: commit
steps:
- name: Sync to gitee.com
uses: wearerequired/git-mirror-action@v1.2.0
Expand All @@ -53,6 +58,10 @@ jobs:
source-repo: git@github.com:FeignClaims/vscode_cpp_starter.git
destination-repo: git@gitee.com:cpp_tutorial/vscode_cpp_starter.git

publish:
runs-on: ubuntu-latest
needs: sync
steps:
- name: Build Gitee Pages
uses: yanglbme/gitee-pages-action@v1.4.2
with:
Expand Down

0 comments on commit ed023f8

Please sign in to comment.