🔄 Sync fork with upstream #234
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 🔄 Sync fork with upstream | |
| on: | |
| schedule: | |
| - cron: "0 3 * * *" # daily at 3 AM UTC | |
| workflow_dispatch: # manual trigger | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout fork | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config user.name "Nogard-YT" | |
| git config user.email "nogmcpe@gmail.com" | |
| - name: Add upstream and fetch | |
| run: | | |
| git remote add upstream https://github.com/misode/misode.github.io.git || true | |
| git fetch upstream | |
| - name: Merge upstream/master into fork/master | |
| run: | | |
| git checkout master | |
| set -e | |
| if git merge upstream/master --no-edit; then | |
| echo "✅ Merge successful, pushing changes" | |
| git push origin master | |
| else | |
| echo "⚠️ Merge conflict, manual resolution required" | |
| exit 1 | |
| fi |