Skip to content

Push to the GitHub Wiki #29

Push to the GitHub Wiki

Push to the GitHub Wiki #29

Workflow file for this run

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@v4
with:
path: job-dsl-plugin
- name: Checkout wiki
uses: actions/checkout@v4
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