Skip to content

Sync Affine Blocksuite #5

Sync Affine Blocksuite

Sync Affine Blocksuite #5

name: Sync Affine Blocksuite
on:
schedule:
- cron: '0 0 * * *' # daily
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout blocksuite Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install git-filter-repo
run: |
sudo apt update
sudo apt install -y python3-pip
pip install git-filter-repo
- name: Clone affine Repository and Extract blocksuite
run: |
git clone --depth=1 https://github.com/toeverything/affine.git affine_repo
cd affine_repo
git filter-repo --subdirectory-filter blocksuite
cd ..
- name: Copy blocksuite to packages/
run: |
rsync -av --delete --exclude '.git' affine_repo/ packages/
rm -rf affine_repo
- name: Commit and Push Changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "chore: sync affine blocksuite to packages on $(date)" || exit 0
git push https://x-access-token:${GITHUB_TOKEN}@github.com/toeverything/blocksuite.git main
git push https://${{ secrets.BS_SYNC_TOKEN }}@github.com/toeverything/blocksuite.git main