Skip to content

sync source code from terminal-wiki #7

sync source code from terminal-wiki

sync source code from terminal-wiki #7

name: Sync with terminal-wiki
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout wiki repository
uses: actions/checkout@v2
with:
repository: charanravi-online/wiki
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Configure user info
run: |
git config user.email "[email protected]"
git config user.name "R Charan"
- name: Fetch changes from terminal-wiki
run: |
git remote add upstream https://github.com/charanravi-online/terminal-wiki.git || true
git fetch upstream
- name: Merge changes allowing unrelated histories and excluding README and LICENSE
run: |
git merge upstream/main --allow-unrelated-histories --no-commit --no-ff
git checkout --ours README.md LICENSE # Keep local versions of these files
git commit -m "Merge changes from terminal-wiki, excluding README and LICENSE"
- name: Push changes
run: |
git push origin main