Skip to content

Commit 9905686

Browse files
authored
build and publish docs to wiki (#53)
2 parents 090d004 + 0ed03e1 commit 9905686

File tree

7 files changed

+183
-2
lines changed

7 files changed

+183
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,26 @@ jobs:
6161
name: OpenIDM
6262
path: openidm-zip/target/*.zip
6363

64+
- name: Configure Git User
65+
run: |
66+
git config --global user.name "Open Identity Platform Community"
67+
git config --global user.email "[email protected]"
68+
cd ..
69+
- uses: actions/checkout@v4
70+
continue-on-error: true
71+
with:
72+
repository: ${{ github.repository }}.wiki
73+
path: ${{ github.event.repository.name }}.wiki
74+
- name: Publish docs in wiki
75+
continue-on-error: true
76+
shell: bash
77+
env:
78+
GITHUB_ACTOR: ${{ github.actor }}
79+
GITHUB_TOKEN: ${{ github.token }}
80+
run: |
81+
cd ${{ github.event.repository.name }}.wiki
82+
rm -rf docbkx
83+
mv ../openig-doc/target/docbkx ../${{ github.event.repository.name }}.wiki
84+
git add -A
85+
git commit -a -m "upload docs after deploy ${{ github.sha }}"
86+
git push --quiet --force

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,28 @@ jobs:
6969
generate_release_notes: true
7070
files: |
7171
openidm-zip/target/*.zip
72+
73+
- uses: actions/checkout@v4
74+
continue-on-error: true
75+
with:
76+
repository: ${{ github.repository }}.wiki
77+
path: ${{ github.event.repository.name }}.wiki
78+
fetch-depth: 0
79+
- name: Publish docs in wiki
80+
continue-on-error: true
81+
shell: bash
82+
env:
83+
GITHUB_ACTOR: ${{ github.actor }}
84+
GITHUB_TOKEN: ${{ github.token }}
85+
run: |
86+
cd ${{ github.event.repository.name }}.wiki
87+
rm -rf docbkx
88+
mv ../openidm-doc/target/docbkx ../${{ github.event.repository.name }}.wiki
89+
git add -A
90+
git commit -a -m "upload docs after release ${{ github.event.inputs.releaseVersion }}"
91+
git tag -f ${{ github.event.inputs.releaseVersion }}
92+
git push --quiet --force
93+
git push --quiet --force origin ${{ github.event.inputs.releaseVersion }}
7294
release-docker:
7395
name: Docker release
7496
runs-on: 'ubuntu-latest'

openidm-doc/pom.xml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
* The contents of this file are subject to the terms of the Common Development and
4+
* Distribution License (the License). You may not use this file except in compliance with the
5+
* License.
6+
*
7+
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
8+
* specific language governing permission and limitations under the License.
9+
*
10+
* When distributing Covered Software, include this CDDL Header Notice in each file and include
11+
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
12+
* Header, with the fields enclosed by brackets [] replaced by your own identifying
13+
* information: "Portions copyright [year] [name of copyright owner]".
14+
*
15+
* Copyright 2011-2016 ForgeRock AS.
16+
* Portions copyright 2024 3A Systems LLC.
17+
-->
18+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
19+
<modelVersion>4.0.0</modelVersion>
20+
21+
<parent>
22+
<groupId>org.openidentityplatform.openidm</groupId>
23+
<artifactId>openidm-project</artifactId>
24+
<version>6.1.1-SNAPSHOT</version>
25+
</parent>
26+
27+
<name>OpenIDM Documentation</name>
28+
29+
<artifactId>openidm-doc</artifactId>
30+
<packaging>pom</packaging>
31+
32+
<profiles>
33+
<profile>
34+
<id>man-pages</id>
35+
<activation>
36+
<os><family>unix</family></os>
37+
<jdk>1.8</jdk>
38+
</activation>
39+
<build>
40+
<plugins>
41+
<plugin>
42+
<groupId>org.openidentityplatform.commons</groupId>
43+
<artifactId>doc-maven-plugin</artifactId>
44+
<version>${commons-plugin.version}</version>
45+
<executions>
46+
<execution>
47+
<id>build-man-pages</id>
48+
<phase>package</phase>
49+
<goals>
50+
<goal>process</goal>
51+
<goal>build</goal>
52+
<goal>release</goal>
53+
</goals>
54+
</execution>
55+
</executions>
56+
<configuration>
57+
<projectName>OpenIDM</projectName>
58+
<projectVersion>${project.version}</projectVersion>
59+
<releaseVersion>${project.version}</releaseVersion>
60+
<buildReleaseZip>true</buildReleaseZip>
61+
<googleAnalyticsId />
62+
<isDraftMode>no</isDraftMode>
63+
<formats combine.self="override">
64+
<format>man</format>
65+
<format>epub</format>
66+
<format>html</format>
67+
<format>pdf</format>
68+
<format>webhelp</format>
69+
<format>xhtml5</format>
70+
</formats>
71+
</configuration>
72+
</plugin>
73+
<plugin>
74+
<groupId>org.apache.maven.plugins</groupId>
75+
<artifactId>maven-antrun-plugin</artifactId>
76+
<executions>
77+
<execution>
78+
<id>zip-docs</id>
79+
<phase>package</phase>
80+
<configuration>
81+
<target>
82+
<property name="compress_formats" value="webhelp,xhtml,html"/>
83+
<ant antfile="${basedir}/src/main/ant/zip.xml">
84+
<target name="docs"/>
85+
</ant>>
86+
</target>
87+
</configuration>
88+
<goals>
89+
<goal>run</goal>
90+
</goals>
91+
</execution>
92+
</executions>
93+
<dependencies>
94+
<dependency>
95+
<groupId>ant-contrib</groupId>
96+
<artifactId>ant-contrib</artifactId>
97+
<version>${ant.contrib.version}</version>
98+
<exclusions>
99+
<exclusion>
100+
<groupId>ant</groupId>
101+
<artifactId>ant</artifactId>
102+
</exclusion>
103+
</exclusions>
104+
</dependency>
105+
</dependencies>
106+
</plugin>
107+
</plugins>
108+
</build>
109+
</profile>
110+
</profiles>
111+
</project>

openidm-doc/src/main/ant/zip.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<project name="zip">
2+
<target name="docs">
3+
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
4+
<foreach param="docname" target="formats" inheritall="true">
5+
<path>
6+
<dirset dir="${basedir}/src/main/docbkx/" casesensitive="yes">
7+
<include name="*/"/>
8+
<exclude name="*/*/**"/>
9+
<exclude name="shared"/>
10+
</dirset>
11+
</path>
12+
<mapper type="flatten"/>
13+
</foreach>
14+
</target>
15+
<target name="formats">
16+
<foreach param="format" list="${compress_formats}" target="dozip" inheritall="true"/>
17+
</target>
18+
<target name="dozip" >
19+
<echo message="compressing ${format} ${docname} from ${project_build_dir}/docbkx/${format}/${docname} to ${project_build_dir}/docbkx/${format}/${docname}.zip"/>
20+
<zip basedir="${project.build.directory}/docbkx/${format}/${docname}" destfile="${project.build.directory}/docbkx/${format}/${docname}.zip"/>
21+
</target>
22+
</project>

openidm-doc/src/main/docbkx/dev-guide/DO-NOT-BUILD-index.xml renamed to openidm-doc/src/main/docbkx/dev-guide/index.xml

File renamed without changes.

openidm-doc/src/main/docbkx/release-notes/index.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
http://docbook.org/xml/5.0/xsd/docbook.xsd'
3131
xmlns:xinclude='http://www.w3.org/2001/XInclude'>
3232
<info>
33-
<xinclude:include href="../shared/mediaobject-fr-logo.xml" />
3433
<title>OpenIDM Release Notes</title>
3534
<subtitle>Version ${docTargetVersion}</subtitle>
3635
<abstract>
@@ -60,7 +59,6 @@
6059
<personname>
6160
<firstname>Andi </firstname><surname>Egloff</surname>
6261
</personname>
63-
<xinclude:include href="../shared/affiliation-fr.xml"/>
6462
</author>
6563
</authorgroup>
6664
<xinclude:include href="../legal.xml" />

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@
182182
<apache.commons-codec.version>1.10</apache.commons-codec.version>
183183
<apache.commons-io.version>2.7</apache.commons-io.version>
184184
<apache.commons-fileupload.version>1.5</apache.commons-fileupload.version>
185+
186+
<commons-plugin.version>2.1.4</commons-plugin.version>
187+
<ant.contrib.version>1.0b3</ant.contrib.version>
188+
185189
<java.surefire.options />
186190
</properties>
187191

@@ -226,6 +230,7 @@
226230
<module>openidm-util</module>
227231
<module>openidm-workflow-activiti</module>
228232
<module>openidm-maintenance</module>
233+
<module>openidm-doc</module>
229234
<!--module>openidm-workflow-remote</module-->
230235
<module>openidm-zip</module>
231236
<module>custom-scripted-connector-bundler</module>

0 commit comments

Comments
 (0)