-
Notifications
You must be signed in to change notification settings - Fork 594
78 lines (64 loc) · 2.19 KB
/
documentation.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Documentation
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.12.1
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: zulu
- uses: actions/setup-go@v5
with:
go-version: '1.22.4'
- name: Install Groovy
run: sudo apt-get update && sudo apt-get install groovy -y
- name: Cache Maven Packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Go Packages
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: docker pull ppiper/jenkinsfile-runner:latest
- name: Generate Groovy Docs
env:
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
run: documentation/bin/createDocu.sh
- name: Generate Golang Docs
run: go run pkg/documentation/generator.go --docuDir=documentation/docs/steps/ --customDefaultFile resources/default_pipeline_environment.yml
- name: Build
run: |
docker run \
-u $(id -u):$(id -g) \
-v ${GITHUB_WORKSPACE}/documentation:/docs \
squidfunk/mkdocs-material:8.5.11 build --clean --strict
- name: Provide Docs Metadata
run: |
mkdir -p documentation/docs-gen/misc
cp target/docuMetaData.json documentation/docs-gen/misc
- name: Deploy
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./documentation/docs-gen
user_name: 'github-actions[bot]'
user_email: '41898282+github-actions[bot]@users.noreply.github.com'
keep_files: true
force_orphan: true