name: Git Repo Sync

on: 
  - push
  - delete

jobs:
  sync-bitbucket:
    if: github.repository_owner == 'Fabulously-Optimized'
    runs-on: ubuntu-22.04
    name: Git Repo Sync - BitBucket
    steps:
    - name: Checkout the Repository
      uses: actions/checkout@v4
      with:
        fetch-depth: 0
    - name: Synchronize code to other Git platforms
      uses: wangchucheng/git-repo-sync@v0.1.0
      with:
        target-url: ${{ secrets.BITBUCKET_GIT }}
        target-username: ${{ secrets.BITBUCKET_USERNAME }}
        target-token: ${{ secrets.BITBUCKET_TOKEN }}
