Skip to content

Commit

Permalink
chore: Add auto-deploy workflow for pushing changes to forked repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Najeong-Kim committed Jul 27, 2024
1 parent aa1581d commit 073c6e2
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/auto-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: push to forked repo
on:
push:
branches:
- main

jobs:
sync:
name: push to forked repo
runs-on: ubuntu-latest

steps:
- name: checkout main
uses: actions/checkout@v4
with:
token: ${{ secrets.FORKED_REPO_TOKEN }}
fetch-depth: 0
ref: main

- name: add remote-url
run: |
git remote add forked-repo https://github.com/Najeong-Kim/WeSki-web:${{ secrets.FORKED_REPO_TOKEN }}@github.com/Najeong-Kim/WeSki-web
git config user.name Najeong-Kim
git config user.email [email protected]
- name: push changes to forked-repo
run: |
git push -f forked-repo main
- name: clean up
run: |
git remote remove forked-repo

0 comments on commit 073c6e2

Please sign in to comment.