merge rusEFI wiki #1252
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
# | |
# ACCESS_TOKEN - Personal Access Token with "public_repo" permission | |
# If there is a change to rusefi/rusefi_documentation, this action merges it to rusefi/rusefi/wiki | |
# | |
# the opposite merge is implemented as https://github.com/rusefi/rusefi/blob/master/.github/workflows/sync-wiki.yaml | |
# | |
name: Sync Wiki2 | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
if: ${{ github.actor != 'actions-user' }} | |
steps: | |
- name: Check out docs repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
repository: rusefi/rusefi.wiki | |
persist-credentials: false | |
- name: Merge from rusefi_documentation | |
run: | | |
git remote add technical-git https://github.com/rusefi/rusefi_documentation.git | |
git fetch technical-git | |
if [ $(git diff technical-git/master | wc -l) -eq 0 ]; then | |
echo "skip=true" >> $GITHUB_ENV | |
exit 0 | |
fi | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git merge technical-git/master | |
- name: Push changes rusefi/rusefi wiki | |
uses: ad-m/github-push-action@master | |
if: ${{ env.skip != 'true' }} | |
with: | |
repository: rusefi/rusefi.wiki | |
github_token: ${{ secrets.ACCESS_TOKEN }} | |
branch: master |