-
Notifications
You must be signed in to change notification settings - Fork 831
47 lines (42 loc) · 1.06 KB
/
wiki.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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 "actions@users.noreply.github.com"
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