Skip to content

Commit

Permalink
feat(工作流): 分离同步到gitee的工作流
Browse files Browse the repository at this point in the history
  • Loading branch information
h7ml committed Jun 13, 2022
1 parent 328907d commit 648ead4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ jobs:
- name: Generate files 🚀
run: yarn build

sync:
name: sync gitee 🚀
runs-on: ubuntu-latest
steps:
- name: Checkout 🚀
uses: actions/checkout@v2
- name: Sync dgiot-dashboard 🚀
uses: Yikun/hub-mirror-action@master
with:
src: github/dgiot
dst: gitee/dgiiot
dst_key: ${{ secrets.PRIVATE_KEY }}
dst_token: ${{ secrets.GIT_TOKEN }}
static_list: "dgiot-dashboard" # 只同步这个项目 https://github.com/Yikun/hub-mirror-action#%E9%BB%91%E7%99%BD%E5%90%8D%E5%8D%95
# sync:
# name: sync gitee 🚀
# runs-on: ubuntu-latest
# steps:
# - name: Checkout 🚀
# uses: actions/checkout@v2
# - name: Sync dgiot-dashboard 🚀
# uses: Yikun/hub-mirror-action@master
# with:
# src: github/dgiot
# dst: gitee/dgiiot
# dst_key: ${{ secrets.PRIVATE_KEY }}
# dst_token: ${{ secrets.GIT_TOKEN }}
# static_list: "dgiot-dashboard" # 只同步这个项目 https://github.com/Yikun/hub-mirror-action#%E9%BB%91%E7%99%BD%E5%90%8D%E5%8D%95
deploy:
name: deploy 🚀
runs-on: ubuntu-latest
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: sync
on: workflow_dispatch

# 设置上海时区
env:
TZ: Asia/Shanghai
jobs:
sync:
name: sync gitee 🚀
if: steps.lerna-cache.outputs.cache-hit != 'true'
runs-on: ubuntu-latest
steps:
# - name: get dashboard size 🚀
# run: size = curl https://api.github.com/repos/dgiot/dgiot-dashboard
- name: Checkout 🚀
uses: actions/checkout@v2
- name: Sync dgiot-dashboard 🚀
uses: Yikun/hub-mirror-action@master
with:
src: github/dgiot
dst: gitee/dgiiot
dst_key: ${{ secrets.PRIVATE_KEY }}
dst_token: ${{ secrets.GIT_TOKEN }}
static_list: "dgiot-dashboard" # 只同步这个项目 https://github.com/Yikun/hub-mirror-action#%E9%BB%91%E7%99%BD%E5%90%8D%E5%8D%95

0 comments on commit 648ead4

Please sign in to comment.