Skip to content

Commit acb17c0

Browse files
committed
修改 github actions
1 parent 7bc6fa4 commit acb17c0

File tree

3 files changed

+32
-59
lines changed

3 files changed

+32
-59
lines changed

.github/workflows/deploy-example-site.yml

+32-8
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,37 @@ jobs:
5050
NODE_OPTIONS: --max-old-space-size=8192
5151
run: nr build:example
5252

53-
- name: Pushes to another repository
54-
uses: cpina/github-action-push-to-another-repository@main
53+
- name: deploy
54+
uses: peaceiris/actions-gh-pages@v3
55+
with:
56+
deploy_key: ${{ secrets.PUSH_TO_ANOTHER_REPO_SSH_DEPLOY_KEY }}
57+
external_repository: fantastic-admin/basic-example
58+
publish_branch: main
59+
publish_dir: ./dist-example
60+
enable_jekyll: true
61+
force_orphan: true
62+
user_name: 'github-actions[bot]'
63+
user_email: 'github-actions[bot]@users.noreply.github.com'
64+
65+
- name: Sync to Gitee
66+
uses: wearerequired/git-mirror-action@master
5567
env:
56-
SSH_DEPLOY_KEY: ${{ secrets.PUSH_TO_ANOTHER_REPO_SSH_DEPLOY_KEY }}
68+
# 注意在 Settings->Secrets 配置 GITEE_RSA_PRIVATE_KEY
69+
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
70+
with:
71+
# 注意替换为你的 GitHub 源仓库地址
72+
source-repo: [email protected]:fantastic-admin/basic-example.git
73+
# 注意替换为你的 Gitee 目标仓库地址
74+
destination-repo: [email protected]:fantastic-admin/basic-example.git
75+
76+
- name: Build Gitee Pages
77+
uses: yanglbme/gitee-pages-action@main
5778
with:
58-
source-directory: dist-example
59-
destination-github-username: fantastic-admin
60-
destination-repository-name: basic-example
61-
user-email: [email protected]
62-
target-branch: main
79+
# 注意替换为你的 Gitee 用户名
80+
gitee-username: hooray
81+
# 注意在 Settings->Secrets 配置 GITEE_PASSWORD
82+
gitee-password: ${{ secrets.GITEE_PASSWORD }}
83+
# 注意替换为你的 Gitee 仓库,仓库名严格区分大小写,请准确填写,否则会出错
84+
gitee-repo: fantastic-admin/basic-example
85+
# 要部署的分支,默认是 master,若是其他分支,则需要指定(指定的分支必须存在)
86+
branch: main

public/.github/workflows/deploy.yml

-51
This file was deleted.

public/.nojekyll

Whitespace-only changes.

0 commit comments

Comments
 (0)