Skip to content

Commit db5b8ad

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

File tree

3 files changed

+35
-59
lines changed

3 files changed

+35
-59
lines changed

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

+35-8
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,40 @@ 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+
sync:
66+
runs-on: ubuntu-latest
67+
needs: deploy
68+
- name: Sync to Gitee
69+
uses: wearerequired/git-mirror-action@master
5570
env:
56-
SSH_DEPLOY_KEY: ${{ secrets.PUSH_TO_ANOTHER_REPO_SSH_DEPLOY_KEY }}
71+
# 注意在 Settings->Secrets 配置 GITEE_RSA_PRIVATE_KEY
72+
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
73+
with:
74+
# 注意替换为你的 GitHub 源仓库地址
75+
source-repo: [email protected]:fantastic-admin/basic-example.git
76+
# 注意替换为你的 Gitee 目标仓库地址
77+
destination-repo: [email protected]:fantastic-admin/basic-example.git
78+
79+
- name: Build Gitee Pages
80+
uses: yanglbme/gitee-pages-action@main
5781
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
82+
# 注意替换为你的 Gitee 用户名
83+
gitee-username: hooray
84+
# 注意在 Settings->Secrets 配置 GITEE_PASSWORD
85+
gitee-password: ${{ secrets.GITEE_PASSWORD }}
86+
# 注意替换为你的 Gitee 仓库,仓库名严格区分大小写,请准确填写,否则会出错
87+
gitee-repo: fantastic-admin/basic-example
88+
# 要部署的分支,默认是 master,若是其他分支,则需要指定(指定的分支必须存在)
89+
branch: main

public/.github/workflows/deploy.yml

-51
This file was deleted.

public/.nojekyll

Whitespace-only changes.

0 commit comments

Comments
 (0)