From b90710c5e7f49953a2cc5f16bc32d399c1de319b Mon Sep 17 00:00:00 2001 From: ihavecoke Date: Thu, 2 Nov 2023 16:40:17 +0800 Subject: [PATCH] ...dd --- .github/workflows/download_feishu_pages.yml | 15 ++++++++++----- scripts/export | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/download_feishu_pages.yml b/.github/workflows/download_feishu_pages.yml index e2d65e3e..c30e65ca 100644 --- a/.github/workflows/download_feishu_pages.yml +++ b/.github/workflows/download_feishu_pages.yml @@ -6,31 +6,36 @@ on: jobs: download_feishu_pages: name: Download feishu pages - timeout-minutes: 30 runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 1 + + - uses: oven-sh/setup-bun@v1 - name: Start export feishu pages env: FEISHU_APP_ID: ${{ secrets.FEISHU_APP_ID }} FEISHU_APP_SECRET: ${{ secrets.FEISHU_APP_SECRET }} FEISHU_SPACE_ID: "7288219896826494980" OUTPUT_DIR: ./feishu-pages - uses: longbridgeapp/feishu-pages@main - - uses: oven-sh/setup-bun@v1 - - name: Copy feishu pages to repo run: | bun install - ./scripts/cp_feishu_to_vitepress.sh + bun export bun autocorrect --fix locales/ bun translate + ls -al . + echo ${{github.workspace}} + + - name: Commit feishu pages to repo + run: | + echo ${{github.workspace}} git status git add . git config --global user.name "LongPort Github CI" git config --global user.email "longportapp-github-ci@users.noreply.github.com" git commit -a -m "Commit feishu pages to repo" + - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: diff --git a/scripts/export b/scripts/export index 4d77d58b..4c319df1 100755 --- a/scripts/export +++ b/scripts/export @@ -1,4 +1,5 @@ bun feishu-pages +mkdir -p locales/en/docs locales/zh-HK/docs cp -r feishu-pages/docs/en/* locales/en/docs/ cp -r feishu-pages/docs/zh-HK/* locales/zh-HK/docs/ cp feishu-pages/docs.json locales/