Skip to content

Commit

Permalink
chore(merging): 'ci-refactor-build-flow' into 'main'
Browse files Browse the repository at this point in the history
ci(gitlab-ci): 尝试修复合并后错误触发流水作业

See merge request sysu-gitlab/thesis-template/better-thesis!11
  • Loading branch information
huangjj27 committed May 17, 2024
2 parents 2787e23 + 5af40d7 commit b7d0a62
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .gitlab/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ check-merge-request:
- export PATH="$PATH:$CARGO_HOME/bin"
- cargo install typst-cli git-cliff sd
script:
- typst compile --root=$CI_PROJECT_DIR --font-path=$CI_PROJECT_DIR/fonts $CI_PROJECT_DIR/template/thesis.typ
- typst compile
--root=$CI_PROJECT_DIR
--font-path=$CI_PROJECT_DIR/fonts
$CI_PROJECT_DIR/template/thesis.typ

check-default-branch:
stage: check
Expand All @@ -33,7 +36,11 @@ check-default-branch:
- export PATH="$PATH:$CARGO_HOME/bin"
- cargo install typst-cli git-cliff sd
script:
- typst compile --root=$CI_PROJECT_DIR --font-path=$CI_PROJECT_DIR/fonts $CI_PROJECT_DIR/template/thesis.typ $CI_PROJECT_DIR/thesis_preview.pdf
- typst compile
--root=$CI_PROJECT_DIR
--font-path=$CI_PROJECT_DIR/fonts
$CI_PROJECT_DIR/template/thesis.typ
$CI_PROJECT_DIR/thesis_preview.pdf
# TODO(#1): the preview pdf should be generated by template repo
# artifacts:
# paths:
Expand All @@ -42,10 +49,10 @@ check-default-branch:
gitlab-release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_COMMIT_TAG
script:
- echo "releasing $CI_COMMIT_TAG on GitLab!"
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && '$CI_COMMIT_TAG'
release:
tag_name: '$CI_COMMIT_TAG'
description: '$CI_COMMIT_TAG_MESSAGE'

0 comments on commit b7d0a62

Please sign in to comment.