name: Backup Git repository on: push: branches: - master jobs: hugo-deploy-gh-pages: runs-on: ubuntu-latest steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 with: go-version: 1.13 id: go - uses: actions/checkout@v1 - name: Build run: | export PATH=$PATH:${PWD}/bin:$GOPATH/bin:/home/runner/go/bin make clean go-bindata-download-linux tools init release - name: Publish Release run: | git clone https://github.com/jenkins-zh/jcli-repo cp release/jcli-darwin-amd64.tar.gz jcli-repo cp release/jcli-linux-amd64.tar.gz jcli-repo cp release/jcli-windows-386.tar.gz jcli-repo cd jcli-repo && git config --local user.email "rick@jenkins-zh.cn" && git config --local user.name "rick" && git add . && git commit -m 'Auto commit by bot' && git push https://linuxsuren:${{ secrets.GITHUB_SECRETS }}@github.com/jenkins-zh/jcli-repo.git - name: backup uses: jenkins-zh/git-backup-actions@v0.0.3 env: GIT_DEPLOY_KEY: ${{ secrets.GIT_DEPLOY_KEY }} TARGET_GIT: "git@gitee.com:jenkins-zh/jenkins-cli.git"