refactor: 优化代码结构和模块导入 #309
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .github/workflows/sync-cnb.yml | |
| name: Sync to CNB | |
| on: | |
| - push | |
| - delete | |
| jobs: | |
| sync-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Sync to CNB Repository | |
| uses: docker://tencentcom/git-sync | |
| env: | |
| PLUGIN_TARGET_URL: "https://cnb.cool/tencent/cherry-markdown/cherry-markdown.git" | |
| PLUGIN_AUTH_TYPE: "https" | |
| PLUGIN_USERNAME: "cnb" | |
| PLUGIN_PASSWORD: ${{ secrets.CHERRY_MARKDOWN_CNB_SYNC_GITHUB }} | |
| PLUGIN_FORCE: "true" | |
| sync-delete-branch: | |
| if: ${{ github.repository == 'Tencent/cherry-markdown' && github.event_name == 'delete' && github.event.ref_type == 'branch' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: TDesignOteam//tdesign-pr-trigger-action@develop | |
| with: | |
| repo: 'tencent/cherry-markdown/cherry-markdown' | |
| token: ${{ secrets.CHERRY_MARKDOWN_CNB_SYNC_GITHUB }} | |
| branch: ${{ github.event.ref }} | |
| trigger: '/delete-cnb-branch' |