Just for fun, I built a new personal site: https://aloci.gitlab.io/lc-docusaurus.
In the GitLab project, to keep organized I use different branches branches:
mainfor everything - the branch of it all.blogfor blog posts (adding new ones, updating existing ones, and fixing typos).contentfor website content (updating the about page and adding new projects).designfor design and frontend stuff (changing fonts and colors).featuresfor different features (adding Vale or a contact form).pagesfor configuring GitLab pages for deploying the website.
To deploy the website with GitLab pages, in the project root directory I created a new file gitlab-ci.yml with the following configuration:
image: node:15.12-alpine3.13
stages:
- deploy
pages:
stage: deploy
script:
- npm install
- npm run build
- mv ./build ./public
artifacts:
paths:
- public
only:
- main