Repository navigation
Expand file tree
/
Copy pathdeploy.gitlab-ci.yml
More file actions
46 lines (45 loc) · 1.78 KB
/
Copy pathdeploy.gitlab-ci.yml
File metadata and controls
46 lines (45 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Push a `weekly` tag if the pipeline succeeded.
# SPDX-FileCopyrightText: The Eigen Authors
# SPDX-License-Identifier: MPL-2.0
deploy:tag:weekly:
stage: deploy
image: ${EIGEN_CI_IMAGE_LINUX_LINT}
dependencies: []
script:
- git tag -f weekly $CI_COMMIT_SHORT_SHA
- git push -f "https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" tag weekly
tags:
- saas-linux-small-amd64
rules: !reference [.rules:libeigen:scheduled-or-web:default-branch, rules]
# Upload docs once the docs build succeeds. `needs:` rather than stage order,
# which would also wait on every test job: the full matrix rarely passes
# outright, so the scheduled docs never deployed.
deploy:docs:
stage: deploy
image: busybox
needs: [ build:linux:docs ]
variables:
PAGES_PREFIX: docs-weekly
script:
- echo "Deploying site to $CI_PAGES_URL"
- mv ${EIGEN_CI_BUILDDIR}/doc/html public
pages:
path_prefix: $PAGES_PREFIX
expire_in: never
artifacts:
name: "$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG"
paths:
- public
tags:
- saas-linux-small-amd64
rules:
- !reference [.rules:libeigen:scheduled-or-web:default-branch, rules]
# Any other protected ref (a release branch or tag) gets its own prefix:
# `docs-weekly` holds the default branch's docs only. An unprotected ref
# deploys nothing; build:linux:docs still builds its documentation.
- if: ($CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web") && $CI_PROJECT_NAMESPACE == "libeigen" && $CI_COMMIT_REF_PROTECTED == "true"
variables:
PAGES_PREFIX: docs-$CI_COMMIT_REF_SLUG
- if: $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_NAMESPACE == "libeigen" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
variables:
PAGES_PREFIX: docs-$CI_COMMIT_REF_NAME