Skip to content

Commit b7d0a62

Browse files
committed
chore(merging): 'ci-refactor-build-flow' into 'main'
ci(gitlab-ci): 尝试修复合并后错误触发流水作业 See merge request sysu-gitlab/thesis-template/better-thesis!11
2 parents 2787e23 + 5af40d7 commit b7d0a62

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.gitlab/ci.yml

+11-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ check-merge-request:
1717
- export PATH="$PATH:$CARGO_HOME/bin"
1818
- cargo install typst-cli git-cliff sd
1919
script:
20-
- typst compile --root=$CI_PROJECT_DIR --font-path=$CI_PROJECT_DIR/fonts $CI_PROJECT_DIR/template/thesis.typ
20+
- typst compile
21+
--root=$CI_PROJECT_DIR
22+
--font-path=$CI_PROJECT_DIR/fonts
23+
$CI_PROJECT_DIR/template/thesis.typ
2124

2225
check-default-branch:
2326
stage: check
@@ -33,7 +36,11 @@ check-default-branch:
3336
- export PATH="$PATH:$CARGO_HOME/bin"
3437
- cargo install typst-cli git-cliff sd
3538
script:
36-
- typst compile --root=$CI_PROJECT_DIR --font-path=$CI_PROJECT_DIR/fonts $CI_PROJECT_DIR/template/thesis.typ $CI_PROJECT_DIR/thesis_preview.pdf
39+
- typst compile
40+
--root=$CI_PROJECT_DIR
41+
--font-path=$CI_PROJECT_DIR/fonts
42+
$CI_PROJECT_DIR/template/thesis.typ
43+
$CI_PROJECT_DIR/thesis_preview.pdf
3744
# TODO(#1): the preview pdf should be generated by template repo
3845
# artifacts:
3946
# paths:
@@ -42,10 +49,10 @@ check-default-branch:
4249
gitlab-release:
4350
stage: release
4451
image: registry.gitlab.com/gitlab-org/release-cli:latest
52+
rules:
53+
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_COMMIT_TAG
4554
script:
4655
- echo "releasing $CI_COMMIT_TAG on GitLab!"
47-
rules:
48-
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && '$CI_COMMIT_TAG'
4956
release:
5057
tag_name: '$CI_COMMIT_TAG'
5158
description: '$CI_COMMIT_TAG_MESSAGE'

0 commit comments

Comments
 (0)