-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 876 Bytes
/
Copy pathsync.yaml
File metadata and controls
37 lines (31 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Sync to Public Repo
on:
push:
branches:
- main
pull_request:
branches:
- main
types:
- closed
jobs:
sync:
runs-on: ubuntu-latest
if: ${{ github.repository == 'NX-AI/xlstm-internal' }}
env:
DESTINATION_URL: git@github.com:NX-AI/xlstm.git
steps:
- name: Checkout source repository
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Configure SSH and Push to Destination
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SYNC_DEPLOY_KEY }}" | base64 --decode > ~/.ssh/sync_deploy_key
chmod 600 ~/.ssh/sync_deploy_key
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/sync_deploy_key
ssh-keyscan github.com >> ~/.ssh/known_hosts
git remote add destination ${DESTINATION_URL}
git push destination main