如何在GitLab页面上部署纯HTML网站 [英] How to deploy plain-html site on GitLab Pages

查看:179
本文介绍了如何在GitLab页面上部署纯HTML网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个纯HTML网站,由 gulp 构建的文件位于/docs 文件夹中.

I had plain HTML site where the files, built by gulp, were in /docs folder.

我找到了此仓库 https://gitlab.com/pages/plain-html 在官方页面上进行了尝试,将 .gitlab-ci.yml 中的/public 目录更改为/docs 目录,并出现错误: CI 总是在构建时向我显示失败错误.

I found this repo https://gitlab.com/pages/plain-html in official pages and tried it, changing /public directory in .gitlab-ci.yml to /docs directory, and had error: CI always showed me failed error on build.

这是我的 .gitlab-ci.yml :

image: alpine:latest

pages:
  stage: deploy
  script:
  - echo 'Nothing to do...'
  artifacts:
    paths:
    - docs
  only:
  - master

我做错了什么?

推荐答案

public 文件夹是必需的.无论如何,您都无法将文件放在其他文件夹中.

The public folder is REQUIRED. You can't put your files in other folder no matter what.

这篇关于如何在GitLab页面上部署纯HTML网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆