Merge pull request #52 from COPRS/pcuq-ads-esa-clause6 #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |