From 3da1711c5185435147bf475d4f7e8f96e3cf416e Mon Sep 17 00:00:00 2001 From: oasis Date: Thu, 26 Dec 2024 10:09:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a0b7416..2fc953f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,23 @@ -# The Docker image that will be used to build your app -image: node:lts -# Functions that should be executed before the build script is run -before_script: - - npm install +stages: + - build + - deploy + + +build: + stage: build + script: + - echo "我是 build" + + + +pages: # job 的名称必须要是 pages + stage: deploy + retry: + max: 2 + + script: # 生成站点 + - mkdir public + - cp index.html public/index.html + artifacts: # 制品 + paths: + - public \ No newline at end of file