Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

name: Mirror Repo
on:
push:
branches:
- main # 필요 브랜치만 트리거
permissions:
contents: read
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # mirror 위해 전체 히스토리 필요
- name: Push mirror
env:
MIRROR_URL: https://<PAT>@github.com/loopers-dongbanza/junho-algo.git
run: |
git remote add mirror "$MIRROR_URL"
git push --mirror mirror