diff --git a/.github/workflows/sync-wiki.yaml b/.github/workflows/sync-wiki.yaml new file mode 100644 index 00000000..2a12b0d0 --- /dev/null +++ b/.github/workflows/sync-wiki.yaml @@ -0,0 +1,37 @@ +# +# ACCESS_TOKEN - Personal Access Token with "public_repo" permission +# + +name: Sync Wiki + +on: + push: + branches: + - master + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + - name: Check out docs repo + uses: actions/checkout@v2 + 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 + git config --local user.email "action@github.com" + 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 + with: + repository: rusefi/rusefi.wiki + github_token: ${{ secrets.ACCESS_TOKEN }} + branch: master