Split into two workflows (#319)

* break workflow into two

* check out repo duh
This commit is contained in:
David Holdeman 2022-12-28 21:27:40 -06:00 committed by GitHub
parent 3dfa245a39
commit 99b3240a02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 21 deletions

41
.github/workflows/sync-wiki2.yaml vendored Normal file
View File

@ -0,0 +1,41 @@
#
# 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@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

View File

@ -5,7 +5,7 @@
# the opposite merge is implemented as https://github.com/rusefi/rusefi/blob/master/.github/workflows/sync-wiki.yaml
#
name: Sync Wiki & Generate static wiki
name: Sync Wiki3
on:
push:
@ -18,12 +18,8 @@ jobs:
if: ${{ github.actor != 'actions-user' }}
steps:
- name: Check out docs repo
- name: Check out repo
uses: actions/checkout@v2
with:
fetch-depth: 0
repository: rusefi/rusefi.wiki
persist-credentials: false
- name: Install mkdocs Prerequisites
run: |
@ -31,21 +27,6 @@ jobs:
sudo apt install sshpass
pip install mkdocs mkdocs-ezlinks-plugin
- 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
- name: Generate static pages using mkdocs
run: |
shopt -s extglob