name: Sync to GitLab with LFS (optimized) on: push: branches: [ main ] jobs: mirror: runs-on: ubuntu-latest steps: - name: Checkout full history uses: actions/checkout@v3 with: fetch-depth: 0 # полный репозиторий для LFS - name: Install Git LFS run: | sudo apt-get update sudo apt-get install -y git-lfs git lfs install - name: Pull all LFS objects run: git lfs pull - name: Configure Git run: | git config --global user.email "github@actions" git config --global user.name "GitHub Actions" - name: Add GitLab remote env: GITLAB_USER: ${{ secrets.GITLAB_USER }} GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} run: git remote add gitlab https://$GITLAB_USER:$GITLAB_TOKEN@gitlab.com/kagvi13/HMP.git - name: Push repository with LFS run: git push --force gitlab main && git lfs push --all gitlab main