Push to the GitHub Wiki #28
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: Push to the GitHub Wiki | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "docs/**" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
push-to-wiki: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
path: job-dsl-plugin | |
- name: Checkout wiki | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{github.repository}}.wiki | |
path: job-dsl-plugin.wiki | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
cache: 'maven' | |
- name: Push to wiki | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "wiki[bot]" | |
pushd job-dsl-plugin | |
./build-wiki.sh | |
popd | |
pushd job-dsl-plugin.wiki | |
cp -r ../job-dsl-plugin/target/docs/* . | |
git add . | |
git commit -m "Automagic update" || true | |
git push | |
popd |