modified wiki_snap.yaml #8
This file contains 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 Source Code to Wiki Repository | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout source repo | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Ensures the full history is checked out | |
- name: Configure Git | |
run: | | |
git config --global user.name 'GitHub Actions Bot' | |
git config --global user.email '[email protected]' | |
- name: Add target repository | |
run: | | |
git remote add target https://x-access-token:${{ secrets.REPO_SYNC_TOKEN }}@github.com/charanravi-online/wiki.git | |
- name: Push changes to target repository | |
run: | | |
git push target main --force |