-
Notifications
You must be signed in to change notification settings - Fork 7
37 lines (34 loc) · 1.43 KB
/
deploy-gitee.yaml
File metadata and controls
37 lines (34 loc) · 1.43 KB
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
name: Sync and Deploy Gitee Pages
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# 将 GitHub 仓库同步到 Gitee 仓库
- name: Sync to Gitee
uses: wearerequired/git-mirror-action@master
env:
# 注意在 Settings->Secrets 配置 GITEE_ED25519_PRIVATE_KEY
SSH_PRIVATE_KEY: ${{ secrets.GITEE_ED25519_PRIVATE_KEY }}
with:
# 注意替换为你的 GitHub 源仓库地址
source-repo: git@github.com:SDU-Application/sduapplication.github.io.git
# 注意替换为你的 Gitee 目标仓库地址
destination-repo: git@gitee.com:sdu-application/sduapplication.github.io.git
# 实现 Gitee Pages 的自动部署
- name: Build Gitee Pages
uses: yanglbme/gitee-pages-action@main
with:
# 注意替换为你的 Gitee 用户名
gitee-username: Levi-hsfq
# 注意在 Settings->Secrets 配置 GITEE_PASSWORD
gitee-password: ${{ secrets.GITEE_PASSWORD }}
# 注意替换为你的 Gitee 仓库,仓库名严格区分大小写,请准确填写,否则会出错
gitee-repo: SDU-Application/sduapplication.github.io
# 要部署的分支,默认是 master,若是其他分支,则需要指定(指定的分支必须存在)
branch: main
# 要部署的分支上的目录
directory: docs