Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IVYPORTAL-18151 Create Github Action for Building Documentation #1352

Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
8386106
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentati…
ntloc-axonivy Dec 23, 2024
776ab55
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentati…
ntloc-axonivy Dec 23, 2024
24ec032
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 23, 2024
dcc09a5
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 23, 2024
0a41a09
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentati…
ntloc-axonivy Dec 23, 2024
75be785
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 24, 2024
19c9dee
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 24, 2024
2cc6a58
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 24, 2024
02536f6
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 24, 2024
6eb60ce
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 24, 2024
4eba256
update
ntloc-axonivy Dec 24, 2024
db8a649
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 24, 2024
f9191ab
update
ntloc-axonivy Dec 24, 2024
2c6a704
update
ntloc-axonivy Dec 24, 2024
c6b6bed
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 24, 2024
128ba24
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 24, 2024
5c58313
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 24, 2024
6bf108a
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 24, 2024
928c461
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 24, 2024
b43e6b0
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 24, 2024
e3a71b8
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 24, 2024
57aeb68
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 25, 2024
1d54396
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 25, 2024
665192c
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 25, 2024
220ba7f
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 25, 2024
1281423
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 25, 2024
e7d6562
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 25, 2024
8071a15
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 25, 2024
79b0e43
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 25, 2024
6c25a67
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 25, 2024
acc29cb
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
d897c04
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
955e543
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
7fe5d47
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
e79cb43
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
6f862a9
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
556058b
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
026e410
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
940600f
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
3f77045
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
4d74cf9
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
3d98f69
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
9026b7e
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
a857075
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
0d03c12
feature/IVYPORTAL-18151-Create-Github-Action-for-Building-Documentation
ntloc-axonivy Dec 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions .github/workflows/portal-documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Portal Documentation
run-name: Build and Deploy Documentation on branch ${{ github.ref_name }} 🚀
on:
schedule:
- cron: '0 0 * * *' # Equivalent to '@midnight'
workflow_dispatch:
inputs:
ivyVersion:
description: 'Ivy version use to replace |version| placeholder of the links which navigate to ivy documentation. e.g.: https://developer.axonivy.com/doc/nightly/designer-guide/configuration/variables.html'
default: 'nightly'
required: true

jobs:

build-document:
runs-on: portal01
steps:
- uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.8

- name: Get current version
id: get_version
run: |
VERSION=$(mvn help:evaluate -Dexpression=revision -q -DforceStdout -f Documentation/pom.xml)
if [[ "$VERSION" == "null object or invalid expression" ]]; then
echo "Error: could not evaluate maven revision property"
# Stops the workflow if the condition is met
exit 1
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Version is $VERSION"

- name: Unzip portal screenshots
run: |
unzip /mnt/portal02/document-screenshots/portal-document-screenshots-selenide-${{ steps.get_version.outputs.version }}.zip \
-d Documentation/portal-guide/source/screenshots

- name: Generate resources
run: |
mvn clean process-resources -Divy.engine.version=[13.1.0,] -Divy.engine.download.url=https://developer.axonivy.com/permalink/dev/axonivy-engine.zip -f Documentation/public-api/pom.xml
mvn clean generate-resources -f Documentation/pom.xml

- name: Run substitute
shell: bash
run: chmod +x Documentation/portal-guide/substitute.sh && Documentation/portal-guide/substitute.sh ${{ inputs.ivyVersion }}

- name: Build Documentation HTML
run: |
docker run -u root:root --rm -v ${{ github.workspace }}:/workspace -w /workspace/Documentation/portal-guide \
axonivy/build-container:read-the-docs-2 make -C /doc-build html BASEDIR='/workspace/Documentation/portal-guide' VERSION=${{ steps.get_version.outputs.version }} 2> sphinx-warnings.log
WARNINGS=$(grep -c "WARNING" sphinx-warnings.log || echo 0)
echo "Found $WARNINGS warnings."
if [ "$WARNINGS" -ge 1 ]; then
echo "Documentation build has warnings. Adding to summary..."
echo "### Documentation Build Warnings" >> $GITHUB_STEP_SUMMARY
echo "Found $WARNINGS warnings during the documentation build." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "#### Warning Details" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat sphinx-warnings.log >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
exit 1
fi

- name: Install or deploy document
run: |
if [[ "${{ steps.get_version.outputs.version }}" == *SNAPSHOT* ]]; then
PHASE="install"
else
PHASE="deploy"
fi
echo "Running 'clean $PHASE' for version ${{ steps.get_version.outputs.version }}"
mvn clean $PHASE -f Documentation/pom.xml

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Documentation
path: |
Documentation/*/build/html/**/*
Documentation/*/target/*.zip

- name: Cleanup
shell: bash
run: sudo rm -rf ${{ github.workspace }}/*

Loading