From daf01cf629842bff819deb33fbdb65784cca3e2d Mon Sep 17 00:00:00 2001 From: Antoine Beaupré Date: Tue, 17 Oct 2023 11:36:51 -0400 Subject: remove duplication between check and pages, and make a build job The `check` job is really a build job here, since it actually does build the website. It just doesn't keep artifacts around... So let's do that, and make the `pages` job just reuse those instead of rebuilding from scratch. This is part of migrating torspec to a static component, as we need artifacts for the built site to be sent in to the static component system. See tpo/tpa/team#41348 --- .gitlab-ci.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0d513ef..fd46f23 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,25 +1,17 @@ +--- -check: +build: # Chosen more or less arbitrarily. image: hrektts/mdbook script: - apt-get update && apt-get install -y python3 git - ./proposals/check_index - ./build_html.sh - -# TODO: -# There is way too much duplication here with "check". -# -# We should remove this once we are uploading to spec.tpo. -# -pages: - image: hrektts/mdbook - script: - - apt-get update && apt-get install -y python3 - - ./build_html.sh - mv html public artifacts: paths: - public + +pages: only: - main -- cgit v1.2.3-54-g00ecf From 7d209823117fe468d3e03a7ea7be5a2fd6127a81 Mon Sep 17 00:00:00 2001 From: Antoine Beaupré Date: Tue, 17 Oct 2023 11:42:04 -0400 Subject: replace the `pages` job with a proper template The `pages-deploy.yml` target will "do the right thing" for us here, it's useless for us to figure out how exactly to do the pages dance here, let's just delegate. Alternatively, we could "vendor" that code in here, but then we lose the benefit of improvements TPA might make here in the future. Also: this will make it easier to enable the static shim once it's ready. --- .gitlab-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd46f23..3f37e01 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,8 @@ build: paths: - public -pages: - only: - - main +include: + project: tpo/tpa/ci-templates + file: + #- static-shim-deploy.yml + - pages-deploy.yml -- cgit v1.2.3-54-g00ecf