Skip to content

update ci/cd

update ci/cd #1

Workflow file for this run

name: Sync to GitHub
on:
push:
branches:
- master
- main
- dev
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Add GitHub remote
run: |
git remote add github https://github.com/cloudQuant/backtrader.git || true
git remote -v
- name: Push to GitHub
env:
GITHUB_TOKEN: ${{ secrets.SYNC_GITHUB_TOKEN }}
run: |
# Configure git
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
# Push all branches and tags
git push https://${GITHUB_TOKEN}@github.com/cloudQuant/backtrader.git --all --force
git push https://${GITHUB_TOKEN}@github.com/cloudQuant/backtrader.git --tags --force