Skip to content
Snippets Groups Projects
Commit f86df684 authored by Alfin Johny's avatar Alfin Johny
Browse files

Merge branch 'documentation/webpage-content' of...

Merge branch 'documentation/webpage-content' of git.rwth-aachen.de:unicado/unicado.gitlab.io into documentation/webpage-content
parents c7794ea2 664e2fea
No related branches found
No related tags found
3 merge requests!55[WEBPAGE] Update style of current unicado page,!18Fix header issue in subpages.,!17Integrate mkdoxy in CI pipeline
...@@ -15,16 +15,17 @@ ...@@ -15,16 +15,17 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
# === Configure pipeline === # === Configure pipeline ===
# This section defines the stages of the pipeline: build and deploy
stages: stages:
- build - build # The 'build' stage is where documentation is generated.
- deploy - deploy # The 'deploy' stage deploys the generated documentation.
# === Build the doxygen documentation === # === Build the doxygen documentation ===
doxygen: doxygen:
image: alpine:latest image: alpine:latest
stage: build stage: build # This job is part of the build stage
tags: tags:
- documentation - documentation # Label for the job to be picked up by appropriate runners
before_script: before_script:
# Install necessary packages, including git, doxygen, and other dependencies # Install necessary packages, including git, doxygen, and other dependencies
- apk update && apk --no-cache add git doxygen graphviz ttf-freefont texmf-dist texmf-dist-latexextra texlive texlive-dvi - apk update && apk --no-cache add git doxygen graphviz ttf-freefont texmf-dist texmf-dist-latexextra texlive texlive-dvi
...@@ -38,52 +39,49 @@ doxygen: ...@@ -38,52 +39,49 @@ doxygen:
- cd $CI_PROJECT_DIR - cd $CI_PROJECT_DIR
artifacts: artifacts:
# Save the generated documentation as artifacts so they can be accessed later in the pipeline
paths: paths:
- $CI_PROJECT_DIR/docs/documentation - $CI_PROJECT_DIR/docs/documentation
rules: rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # Run when the commit is on the default branch
when: on_success when: on_success # Only run if the previous jobs are successful
- if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH' - if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH' # Allow manual triggers on non-default branches
when: manual when: manual # Run only when triggered manually
- if: '$CI_PIPELINE_SOURCE == "trigger"' - if: '$CI_PIPELINE_SOURCE == "trigger"' # Triggered by another pipeline
when: on_success when: on_success # Run if the source pipeline was successful
# === Build and deploy the website === # === Build and deploy the website ===
pages: pages:
image: python:latest image: python:latest
stage: deploy stage: deploy # This job is part of the deploy stage
tags: tags:
- documentation - documentation # Label for the job to be picked up by appropriate runners
before_script: before_script:
# Install pipenv to manage Python dependencies
- pip install pipenv - pip install pipenv
- pipenv install - pipenv install # Install the dependencies from the Pipfile
script: script:
# Create the folder where the generated markdown files will be stored
- mkdir $CI_PROJECT_DIR/docs/aircraft-xml - mkdir $CI_PROJECT_DIR/docs/aircraft-xml
# Generate markdown documentation for different sections of the aircraft design
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title General --level 1 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/general.md - python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title General --level 1 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/general.md
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title MassesAndLoadings --level 3 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/masses.md - python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title MassesAndLoadings --level 3 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/masses.md
# Repeat for other titles (structure, propulsion, etc.)
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title Geometry --level 6 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/geometry.md - python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title Geometry --level 6 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/geometry.md
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title Structure --level 2 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/structure.md # Add additional python scripts for other sections as necessary
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title Accommodation --level 2 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/accommodation.md - python scripts/copy_aircraft_design_to_docs.py # Copy other documentation resources
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title Propulsion --level 3 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/propulsion.md # Build the MkDocs documentation site
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title Systems --level 2 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/systems.md
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title Aerodynamics --level 2 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/aerodynamics.md
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title StabilityAndControlCharacteristics --level 2 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/stability.md
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title Performance --level 4 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/performance.md
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title MonetaryValues --level 4 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/monetary.md
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title EcologicalValues --level 4 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/ecological.md
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title Requirements --level 3 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/requirements.md
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title DesignSpecification --level 4 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/specification.md
- python scripts/copy_aircraft_design_to_docs.py
- pipenv run mkdocs build --site-dir $CI_PROJECT_DIR/public - pipenv run mkdocs build --site-dir $CI_PROJECT_DIR/public
needs: needs:
- doxygen - doxygen # This job depends on the successful completion of the doxygen job
artifacts: artifacts:
# Save the generated static website files as artifacts
paths: paths:
- $CI_PROJECT_DIR/public - $CI_PROJECT_DIR/public
rules: rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # Run when the commit is on the default branch
when: on_success when: on_success # Only run if the previous jobs are successful
- if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH' - if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH' # Allow manual triggers on non-default branches
when: manual when: manual # Run only when triggered manually
- if: '$CI_PIPELINE_SOURCE == "trigger"' - if: '$CI_PIPELINE_SOURCE == "trigger"' # Triggered by another pipeline
when: on_success when: on_success # Run if the source pipeline was successful
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment