Commit b6631e5e authored by GridexX's avatar GridexX Committed by Thomas Boni
Browse files

feat(marp): update image tag, add version variable



Signed-off-by: default avatarGridexX <arsene582@gmail.com>
parent 710b8309
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
# Changelog
All notable changes to this job will be documented in this file.

## [0.3.0] - 2023-04-03
* Bump `IMAGE_TAG` variable from `89-with-node-14` to `102-with-node-16`
* Add `MARP_CLI_VERSION` variable

## [0.2.2] - 2023-02-28
* Fix broken documentation links

+2 −1
Original line number Diff line number Diff line
@@ -33,10 +33,11 @@ Build HTML slides form Markdown using [Marp](https://marp.app/){:target="_blank"
| `MARP_INPUT_PATH` | Input directory path | `slides/` |
| `MARP_OUTPUT_PATH` | Output directory path | `website_build/` |
| `GENERATE_PDF` | Should generate pdf files | `true` |
| `MARP_CLI_VERSION` | The version of the package [marp-cli](https://www.npmjs.com/package/@marp-team/marp-cli) | `2.4.0` |
| `MARP_ADDITIONNAL_OPTIONS` | Other [options](https://github.com/marp-team/marp-cli#by-cli-option){:target="_blank"} you may want to use with Marp | ` ` |
| `NPM_INSTALL_DIR` | Custom installation directory for `npm` | `.npm-global/` |
| `CHROME_PATH` | Custom path for chromium (needed to avoid permission error on generating pdf) | `/usr/bin/chromium-browser` |
| `IMAGE_TAG` | The default tag for the docker image | `89-with-node-14`  |
| `IMAGE_TAG` | The default tag for the docker image | `102-with-node-16`  |


## Artifacts
+3 −2
Original line number Diff line number Diff line
@@ -12,20 +12,21 @@ marp:
    MARP_OUTPUT_PATH: 'website_build/'
    MARP_INPUT_PATH: 'slides/'
    GENERATE_PDF: 'true'
    MARP_CLI_VERSION: '2.4.0'
    MARP_ADDITIONNAL_OPTIONS: ' '

    #Custom installation directory for npm in order to use marp command
    NPM_INSTALL_DIR: ".npm-global"
    #Custom path is needed to avoid permission error on generating pdf
    CHROME_PATH: "/usr/bin/chromium-browser"
    IMAGE_TAG: "89-with-node-14"
    IMAGE_TAG: "102-with-node-16"
  script:
    - mkdir ${CI_PROJECT_DIR}/${NPM_INSTALL_DIR}
    - npm config set prefix '${CI_PROJECT_DIR}/${NPM_INSTALL_DIR}'

    - export PATH=${CI_PROJECT_DIR}/${NPM_INSTALL_DIR}/bin:$PATH

    - npm install -g @marp-team/marp-cli@1.4.1 
    - npm install -g @marp-team/marp-cli@${MARP_CLI_VERSION}

    - marp ${MARP_ADDITIONNAL_OPTIONS} -I $MARP_INPUT_PATH -o ${CI_PROJECT_DIR}/${MARP_OUTPUT_PATH}
    - if [ $GENERATE_PDF == "true" ]; then