Skip to content

Export feishu pages and create pull request to dev branch #11

Export feishu pages and create pull request to dev branch

Export feishu pages and create pull request to dev branch #11

name: Export feishu pages and create pull request to dev branch
on: workflow_dispatch
jobs:
download_hk_site_feishu_pages:
name: Download feishu pages
timeout-minutes: 30
runs-on: ubuntu-latest
if: ${{endsWith(github.ref_name,'hk-site')}}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Start export feishu pages
env:
FEISHU_APP_ID: ${{ secrets.FEISHU_APP_ID }}
FEISHU_APP_SECRET: ${{ secrets.FEISHU_APP_SECRET }}
FEISHU_SPACE_ID: "7327965030941605889"
OUTPUT_DIR: ./feishu-pages
BASE_URL: ./
ROOT_NODE_TOKEN: ImyxwaA8gi8Am2kC4rEc8uHQnmb
uses: longbridgeapp/feishu-pages@main
- uses: oven-sh/setup-bun@v1
- name: Copy feishu pages to repo
run: |
bun install
bun run setup
- name: Commit feishu pages to repo
run: |
BRANCH_NAME=update-pages-$(date +'%Y%m%d%H%M%S')
git checkout -b $BRANCH_NAME
git status
git add .
git config --global user.name "Longbridge Whale docs bot"
git config --global user.email "[email protected]"
git commit -a -m "Commit feishu updated pages to repo"
git push origin $BRANCH_NAME
# Create Pull Request
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"title":"Update feishu pages","head":"'$BRANCH_NAME'","base":"release-hk-site"}' https://api.github.com/repos/${{ github.repository }}/pulls
download_sg_site_feishu_pages:
name: Download feishu pages
timeout-minutes: 30
runs-on: ubuntu-latest
if: ${{endsWith(github.ref_name,'sg-site')}}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Start export feishu pages
env:
FEISHU_APP_ID: ${{ secrets.FEISHU_APP_ID }}
FEISHU_APP_SECRET: ${{ secrets.FEISHU_APP_SECRET }}
FEISHU_SPACE_ID: "7327965030941605889"
OUTPUT_DIR: ./feishu-pages
ROOT_NODE_TOKEN: MUjKw9i3zi9puek05HkcYCtpnHf
BASE_URL: ./
uses: longbridgeapp/feishu-pages@main
- uses: oven-sh/setup-bun@v1
- name: Copy feishu pages to repo
run: |
bun install
bun run setup
- name: Commit feishu pages to repo
run: |
BRANCH_NAME=update-pages-$(date +'%Y%m%d%H%M%S')
git checkout -b $BRANCH_NAME
git status
git add .
git config --global user.name "Longbridge Whale docs bot"
git config --global user.email "[email protected]"
git commit -a -m "Commit feishu updated pages to repo"
git push origin $BRANCH_NAME
# Create Pull Request
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"title":"Update feishu pages","head":"'$BRANCH_NAME'","base":"release-sg-site"}' https://api.github.com/repos/${{ github.repository }}/pulls
download_whale_feishu_pages:
name: Download feishu pages
timeout-minutes: 30
runs-on: ubuntu-latest
if: ${{endsWith(github.ref_name,'whale')}}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Start export feishu pages
env:
FEISHU_APP_ID: ${{ secrets.FEISHU_APP_ID }}
FEISHU_APP_SECRET: ${{ secrets.FEISHU_APP_SECRET }}
FEISHU_SPACE_ID: "7327965030941605889"
OUTPUT_DIR: ./feishu-pages
BASE_URL: ./
ROOT_NODE_TOKEN: OGJmw2SZki14lgkujPjc4Pq4nbb
uses: longbridgeapp/feishu-pages@main
- uses: oven-sh/setup-bun@v1
- name: Copy feishu pages to repo
run: |
bun install
bun run setup
- name: Commit feishu pages to repo
run: |
BRANCH_NAME=update-pages-$(date +'%Y%m%d%H%M%S')
git checkout -b $BRANCH_NAME
git status
git add .
git config --global user.name "Longbridge Whale docs bot"
git config --global user.email "[email protected]"
git commit -a -m "Commit feishu updated pages to repo"
git push origin $BRANCH_NAME
# Create Pull Request
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"title":"Update feishu pages","head":"'$BRANCH_NAME'","base":"release-whale"}' https://api.github.com/repos/${{ github.repository }}/pulls