diff options
author | Nick Mathewson <nickm@torproject.org> | 2023-11-09 21:50:10 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2023-11-09 21:50:10 +0000 |
commit | 9205c7a86ffbea46d16f0a13e205100fc3ba1c76 (patch) | |
tree | b71d7302e03fba149b8b389599668f72f97f390f /.gitlab-ci.yml | |
parent | 7e952cdcbb13f2bc2d360994812ff1c39e1011ea (diff) | |
parent | 964a8aca24913d498a2677686e88d96b118ad536 (diff) | |
download | torspec-9205c7a86ffbea46d16f0a13e205100fc3ba1c76.tar.gz torspec-9205c7a86ffbea46d16f0a13e205100fc3ba1c76.zip |
Merge branch 'mermaid2' into 'main'
Improved mermaid branch, with server-side rendering.
See merge request tpo/core/torspec!207
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bb2dec4..06942af 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,9 +4,26 @@ variables: build: image: rust:bookworm + rules: + # We install mermaid-cli only when we are building for the + # actual website, since it is pretty expensive. If we switch to + # faster install tool, we should revisit that. + - if: '$CI_PROJECT_ROOT_NAMESPACE == "tpo" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' + variables: + MMDC: mmdc -p bin/ci-puppeteer-config.json + # ^ See note + # But we _do_ want to build unconditionally. + - when: always script: - - ./bin/via-cargo-install-in-ci mdbook + - env - apt-get update && apt-get install -y git python3 python3-yaml + - ./bin/via-cargo-install-in-ci mdbook + - | + if test "$MMDC" != "" ; then + ./bin/mermaid-cli-in-ci + else + ./bin/via-cargo-install-in-ci mdbook-mermaid + fi - ./bin/check_index - ./bin/build_html - mv html public @@ -17,11 +34,19 @@ build: paths: - cache +# Note re MMDC above: +# https://github.com/mermaid-js/mermaid-cli/blob/HEAD/docs/linux-sandbox-issue.md +# +# bin/ is the wrong place for that file +# but I don't want to rename all of bin/ to maint/ right now. + link-check: image: rust:bookworm + rules: + - when: always script: - - ./bin/via-cargo-install-in-ci mdbook - apt-get update && apt-get install -y git python3 python3-yaml linklint + - ./bin/via-cargo-install-in-ci mdbook - ./bin/build_html - ./bin/check_links artifacts: @@ -43,4 +68,4 @@ include: # request. pages: rules: - - if: '$CI_PROJECT_ROOT_NAMESPACE != "tpo" && $CI_PIPELINE_SOURCE == "merge_request"' + - if: '$CI_PROJECT_ROOT_NAMESPACE != "tpo" && $CI_PIPELINE_SOURCE == "merge_request_event"' |