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