Skip to content

Merge pull request #53 from COPRS/pcuq-ads-add-licence #75

Merge pull request #53 from COPRS/pcuq-ads-add-licence

Merge pull request #53 from COPRS/pcuq-ads-add-licence #75

# Copyright 2023 CS Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: PS2 Documentation Export
on:
push:
branches:
- 'main'
- 'release/**'
- '**doc**'
paths:
- '**'
tags:
- "[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
- "[0-9]+.[0-9]+.[0-9]"
workflow_dispatch: { }
jobs:
convert_add_via_pandoc_with_properties:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Latex commands for defining parameters
run: |
echo "\newcommand{\doctitle}{Processing Sentinel 2 Architecture Design Document}" >> latexcommands.tex
echo "\newcommand{\docversion}{1.0}" >> latexcommands.tex
echo "\newcommand{\docdate}{06/09/2022}" >> latexcommands.tex
echo "\newcommand{\docstatus}{Draft}" >> latexcommands.tex
cat latexcommands.tex docs/media/header-cs.tex > header-cs2.tex
- name: Add doc properties on top and title
run: |
echo "---" >> patch.md
echo "Title: Readme" >> patch.md
echo "include-before: |" >> patch.md
echo " \vspace*{4cm}\hspace*{2cm}{\LARGE\textbf{\doctitle}}\\" >> patch.md
echo " \hspace*{2cm}{\large Status:\hspace{5mm}\docstatus}\\" >> patch.md
echo " \hspace*{2cm}{\large Version:\hspace{5mm}\docversion}\\" >> patch.md
echo " \hspace*{2cm}{\large Date:\hspace{5mm}\docdate}" >> patch.md
echo " \hspace*{2cm}\rule{8cm}{0.4pt}\\" >> patch.md
echo " \hspace*{2cm}{\large ESA Contract Number:\hspace{5mm}1234}\\" >> patch.md
echo " \hspace*{2cm}{\large Deliverable Number:\hspace{5mm}5678}\\" >> patch.md
echo " \hspace*{2cm}{\large Project Reference:\hspace{5mm}XYZ}" >> patch.md
echo " \hspace*{2cm}\rule{8cm}{0.4pt}\\" >> patch.md
echo " \hspace*{2cm}Copyright CS GROUP FRANCE" >> patch.md
echo " \newpage" >> patch.md
echo "---" >> patch.md
cat patch.md docs/architecture/README.md > README_patched.md
- name: make output dir
id: make_output_dir
run: mkdir output # create output dir
- name: Create PDF
uses: docker://ghcr.io/coprs/reference-system-software:dependencies_pandoc_latex
with:
args: -s --resource-path="/github/workspace/docs/media:/github/workspace/inputs/media:." --listings -H /root/.pandoc/listings-setup.tex -H /root/.pandoc/deeplists.tex -H header-cs2.tex -V geometry:margin=1in --table-of-contents --pdf-engine=xelatex --output="output/CSGF-CSC-RS-PRD-ADDPS2.pdf" --from=markdown+autolink_bare_uris README_patched.md
- uses: actions/upload-artifact@master
with:
name: documentation
path: output
convert_sim_via_pandoc_with_properties:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Latex commands for defining parameters
run: |
echo "\newcommand{\doctitle}{Processing Sentinel 2 Installation Manual}" >> latexcommands.tex
echo "\newcommand{\docversion}{1.0}" >> latexcommands.tex
echo "\newcommand{\docdate}{16/09/2022}" >> latexcommands.tex
echo "\newcommand{\docstatus}{Draft}" >> latexcommands.tex
cat latexcommands.tex docs/media/header-cs.tex > header-cs2.tex
- name: Add doc properties on top and title
run: |
echo "---" >> patch.md
echo "Title: Readme" >> patch.md
echo "include-before: |" >> patch.md
echo " \vspace*{4cm}\hspace*{2cm}{\LARGE\textbf{\doctitle}}\\" >> patch.md
echo " \hspace*{2cm}{\large Status:\hspace{5mm}\docstatus}\\" >> patch.md
echo " \hspace*{2cm}{\large Version:\hspace{5mm}\docversion}\\" >> patch.md
echo " \hspace*{2cm}{\large Date:\hspace{5mm}\docdate}" >> patch.md
echo " \hspace*{2cm}\rule{8cm}{0.4pt}\\" >> patch.md
echo " \hspace*{2cm}{\large ESA Contract Number:\hspace{5mm}1234}\\" >> patch.md
echo " \hspace*{2cm}{\large Deliverable Number:\hspace{5mm}5678}\\" >> patch.md
echo " \hspace*{2cm}{\large Project Reference:\hspace{5mm}XYZ}" >> patch.md
echo " \hspace*{2cm}\rule{8cm}{0.4pt}\\" >> patch.md
echo " \hspace*{2cm}Copyright CS GROUP FRANCE" >> patch.md
echo " \newpage" >> patch.md
echo "---" >> patch.md
cat patch.md docs/installation_manual/README.md > README_patched.md
- name: make output dir
id: make_output_dir
run: mkdir output # create output dir
- name: Create PDF
uses: docker://ghcr.io/coprs/reference-system-software:dependencies_pandoc_latex
with:
args: -s --resource-path="/github/workspace/docs/media:/github/workspace/inputs/media:." --listings -H /root/.pandoc/listings-setup.tex -H /root/.pandoc/deeplists.tex -H header-cs2.tex -V geometry:margin=1in --table-of-contents --pdf-engine=xelatex --output="output/CSGF-CSC-RS-PRD-SIM-PS2.pdf" --from=markdown+autolink_bare_uris README_patched.md
- uses: actions/upload-artifact@master
with:
name: documentation
path: output
convert_sum_via_pandoc_with_properties:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Latex commands for defining parameters
run: |
echo "\newcommand{\doctitle}{Processing Sentinel 2 User's Manual}" >> latexcommands.tex
echo "\newcommand{\docversion}{1.0}" >> latexcommands.tex
echo "\newcommand{\docdate}{16/09/2022}" >> latexcommands.tex
echo "\newcommand{\docstatus}{Draft}" >> latexcommands.tex
cat latexcommands.tex docs/media/header-cs.tex > header-cs2.tex
- name: Add doc properties on top and title
run: |
echo "---" >> patch.md
echo "Title: Readme" >> patch.md
echo "include-before: |" >> patch.md
echo " \vspace*{4cm}\hspace*{2cm}{\LARGE\textbf{\doctitle}}\\" >> patch.md
echo " \hspace*{2cm}{\large Status:\hspace{5mm}\docstatus}\\" >> patch.md
echo " \hspace*{2cm}{\large Version:\hspace{5mm}\docversion}\\" >> patch.md
echo " \hspace*{2cm}{\large Date:\hspace{5mm}\docdate}" >> patch.md
echo " \hspace*{2cm}\rule{8cm}{0.4pt}\\" >> patch.md
echo " \hspace*{2cm}{\large ESA Contract Number:\hspace{5mm}1234}\\" >> patch.md
echo " \hspace*{2cm}{\large Deliverable Number:\hspace{5mm}5678}\\" >> patch.md
echo " \hspace*{2cm}{\large Project Reference:\hspace{5mm}XYZ}" >> patch.md
echo " \hspace*{2cm}\rule{8cm}{0.4pt}\\" >> patch.md
echo " \hspace*{2cm}Copyright CS GROUP FRANCE" >> patch.md
echo " \newpage" >> patch.md
echo "---" >> patch.md
cat patch.md docs/user_manual/README.md > README_patched.md
- name: make output dir
id: make_output_dir
run: mkdir output # create output dir
- name: Create PDF
uses: docker://ghcr.io/coprs/reference-system-software:dependencies_pandoc_latex
with:
args: -s --resource-path="/github/workspace/docs/media:/github/workspace/inputs/media:." --listings -H /root/.pandoc/listings-setup.tex -H /root/.pandoc/deeplists.tex -H header-cs2.tex -V geometry:margin=1in --table-of-contents --pdf-engine=xelatex --output="output/CSGF-CSC-RS-PRD-SUM-PS2.pdf" --from=markdown+autolink_bare_uris README_patched.md
- uses: actions/upload-artifact@master
with:
name: documentation
path: output