Merge branch 'develop' into main #3
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: "Mirror wiki/ to repo.wiki" | |
# Run on changes to the `wiki` directory on the `main` branch | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'wiki/**' | |
jobs: | |
mirror: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v3 | |
with: | |
path: TomoBEAR | |
- name: Checkout wiki | |
uses: actions/checkout@v3 | |
with: | |
repository: "KudryashevLab/TomoBEAR.wiki" | |
path: TomoBEAR.wiki | |
- name: Copy wiki files | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Wiki mirror" | |
cp $GITHUB_WORKSPACE/TomoBEAR/wiki/*.md $GITHUB_WORKSPACE/TomoBEAR.wiki | |
cd $GITHUB_WORKSPACE/TomoBEAR.wiki | |
git add . | |
# only commit if there are changes | |
git diff-index --quiet HEAD -- || git commit -m "sync from wiki/" | |
git push |