gitlab ci pages

参考文章

gitlab pages是什么

一个可以利用gitlab的域名和项目部署自己静态网站的机制

开启

到gitlab的如下页面
在这里插入图片描述

通过gitlab.ci部署项目的静态网站

# build ruby 1/3:
#   stage: build
#   script:
#     - echo "ruby1"# build ruby 2/3:
#   stage: build
#   script:
#     - echo "ruby2"# build ruby 3/3:
#   stage: build
#   script:
#     - echo "ruby3"# .hidden_job:
#   stage: test
#   script:
#     - echo ".hidden_job"stages:- build- test- deploybuild-job:stage: buildscript:- echo "BUILD_VARIABLE=value_from_build_job" >> build.envartifacts:reports:dotenv: build.envtest-job:stage: testscript:- echo "$BUILD_VARIABLE"  # Output is: 'value_from_build_job'# Functions that should be executed before the build script is runpages:stage: deploy#  before_script:
#    - mkdir public# The Docker image that will be used to build your appimage: dockette/mvnscript:- mkdir public- mvn clean test- cp -rf  ljunit/target/site/jacoco/* public/
#    - mv ljunit/target/site/jacoco/ publicartifacts:paths:# The folder that contains the files to be exposed at the Page URL- publicexpire_in: 2 days

结果

在这里插入图片描述
pages:deploy这个job是gitlab帮我们生成的,点不开。其实我也好想能够生成动态的job,但是不知道怎么弄。
在这里插入图片描述