Commit 1137bb32 authored by liziwl's avatar liziwl
Browse files

update ci

parent e1729f91
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
name: Sync to gitee
on: [push]
on:
  push:
  schedule:
    - cron: '0 */3 * * *'
    # 每隔3小时运行一次同步
jobs:
  build:
    runs-on: ubuntu-latest
@@ -10,10 +14,9 @@ jobs:
      run: |
        mkdir -p /tmp/tmp_push
        cd /tmp/tmp_push
        git clone https://github.com/liziwl/sustech-master-thesis.git this_repo
        git clone --bare https://github.com/liziwl/sustech-master-thesis.git this_repo
        cd this_repo
        git remote set-url origin "https://${GITEE_USER}:${GITEE_PERSONAL_TOKEN}@${REPO_URL}"
        git push -u -f origin master
        git push --force --mirror "https://${GITEE_USER}:${GITEE_PERSONAL_TOKEN}@${REPO_URL}"
      env:
        GITEE_USER: ${{ secrets.GITEE_USER }}
        GITEE_PERSONAL_TOKEN: ${{ secrets.GITEE_PERSONAL_TOKEN }}