@@ -50,13 +50,40 @@ jobs:
50
50
NODE_OPTIONS : --max-old-space-size=8192
51
51
run : nr build:example
52
52
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
55
70
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
57
81
with :
58
- source-directory : dist-example
59
- destination-github-username : fantastic-admin
60
- destination-repository-name : basic-example
61
-
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
0 commit comments