name: Main-CI # on: [push, pull_request] on: push: branchs: - master - test - dev paths-ignore: # - '.github/**' - 'README.md' - 'changelog.md' # pull_request: # branchs: # - master # - test # - dev env: BRANCH_NAME: ${{ github.ref }} CO_REF: ${{ secrets.CO_REF }} GH_REF: ${{ secrets.GH_REF }} jobs: coding-deploy: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@master - name: Cache uses: actions/cache@v2 with: path: mbfiles key: ${BRANCH_NAME}-coding - name: Deploy To Coding run: | test ! -d mbfiles && git clone -b `basename ${BRANCH_NAME}` ${CO_REF} ./tools/gitsync.sh pack ./tools/gitsync.sh deploy_lfs mbfiles `basename ${BRANCH_NAME}` ${CO_REF} github-deploy: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@master - name: Cache uses: actions/cache@v2 with: path: mbfiles key: ${BRANCH_NAME}-github - name: Deploy To GitHub run: | test ! -d mbfiles && git clone -b `basename ${BRANCH_NAME}` ${GH_REF} ./tools/gitsync.sh pack ./tools/gitsync.sh deploy mbfiles `basename ${BRANCH_NAME}` ${GH_REF} # gitee空间限制,不再使用 # gitee-deploy: # runs-on: ubuntu-latest # needs: github-deploy # steps: # - name: Sync To Gitee # uses: wearerequired/git-mirror-action@v1 # env: # SSH_PRIVATE_KEY: ${{ secrets.GE_TOKEN }} # with: # source-repo: 'git@github.com:monlor/mbfiles.git' # destination-repo: 'git@gitee.com:monlor/mbfiles.git'