0

Website content

.
├── index.html
└── images/
    ├── a.jpg
    ├── b.jpg
    └── c.jpg

I wonder if the following is still valid and reliable. I found it on a blog post written in 2016.

pages:
  stage: deploy
  script:
  - mkdir .public
  - cp -r * .public
  - mv .public public
  artifacts:
    paths:
    - public
  only:
  - main

Is the current CI template any better?

pages:
  stage: deploy
  environment: production
  script:
    - mkdir .public
    - cp -r ./* .public
    - rm -rf public
    - mv .public public
  artifacts:
    paths:
      - public
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
Mori
  • 8,137
  • 19
  • 63
  • 91
  • Whether that job is configured "valid" can be checked through Gitlabs own linters. Whether it is reliable or whether the other is "better" depends on what you want to achieve. Anything not working with them? – Nico Haase May 09 '23 at 05:58

0 Answers0