| name: Sync to GitLab | |
| on: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| mirror: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout full history | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 # Без shallow clone | |
| - name: Push to GitLab | |
| env: | |
| GITLAB_URL: https://gitlab.com/kagvi13/HMP.git | |
| GITLAB_USER: ${{ secrets.GITLAB_USER }} | |
| GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} | |
| run: | | |
| git config --global user.email "github@actions" | |
| git config --global user.name "GitHub Actions" | |
| git remote add gitlab https://$GITLAB_USER:[email protected]/kagvi13/HMP.git | |
| git push --force gitlab main | |