gpt4 book ai didi

gitlab - 是否可以为每个分支创建 gitlab-pages

转载 作者:行者123 更新时间:2023-12-02 03:05:52 25 4
gpt4 key购买 nike

<分区>

我在 GitLab Pages 上托管了一个普通的 JavaScript 应用程序。最近,我一直在进行更改和错误修复,这些更改和错误修复一直在破坏该站点,直到已经推送了这些更改我才注意到。

为了减少用户接触错误的机会,我想在不同的文件夹中发布两个站点:

  • public/ : master 分支;官网
  • public/staging/ : staging 分支;每晚构建

我希望这些对应于两个不同的分支:masterstaging

阅读 GitLab CI for GitLab Pages ,听起来这甚至是不可能的。我希望我读错了。

default:
image: node:latest

test:
stage: test
script:
- npm install
- node test.js
only:
- staging
- master

staging:
stage: deploy
environment: staging
script:
- mkdir -p public/staging
- cp -r www public/staging
artifacts:
paths:
- public
only:
- staging

pages:
stage: deploy
environment: production
script:
- mkdir -p public
- cp -r www public
artifacts:
paths:
- public
only:
- master

这可能吗?是否可以从两个不同的分支部署两个不同的文件夹?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com