-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (50 loc) · 1.43 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: sync_to_gitee
on:
pull_request:
push:
branches:
- main
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Setup Python
uses: actions/setup-python@v5.0.0
with:
python-version: "3.11"
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Install sphinx
shell: bash
working-directory: docs
run: |
pip install -U sphinx
pip install -r requirements.txt
- name: Build docs
shell: bash
working-directory: docs
run: |
rm -rf build
sphinx-build source build
- name: Commit changes
uses: EndBug/add-and-commit@v9.1.3
with:
default_author: github_actions
message: "[bot] Build gitee pages"
- name: Sync to gitee.com
uses: wearerequired/git-mirror-action@v1.2.0
env:
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
with:
source-repo: git@github.com:FeignClaims/vscode_cpp_starter.git
destination-repo: git@gitee.com:cpp_tutorial/vscode_cpp_starter.git
- name: Build Gitee Pages
uses: yanglbme/gitee-pages-action@v1.4.2
with:
gitee-username: FeignClaims
gitee-password: ${{ secrets.GITEE_PASSWORD }}
gitee-repo: cpp_tutorial/vscode_cpp_starter
branch: main
directory: docs/build/