Deploying to GitLab Pages
GitLab Pages offers built-in CI/CD pipelines to build and host your portfolio directly from your GitLab repository.
Configuration
To deploy on GitLab, you need to create a .gitlab-ci.yml file in your project root.
yaml
image: oven/bun:latest
pages:
stage: deploy
script:
- bun install
- bunx portosaur build
- mv build public # GitLab Pages expects files in 'public' folder
artifacts:
paths:
- public
only:
- main # Or your default branchHow it works
- Pipeline: When you push to the
mainbranch, GitLab starts a CI/CD job. - Artifact: The
buildfolder is generated, renamed topublic, and saved as a job artifact. - Deployment: GitLab automatically serves the contents of the
publicartifact at your project's URL.
Accessing your site
Once the pipeline finishes, your site will be available at: https://<username>.gitlab.io/<project-name>/
NOTE
GitLab Pages handles routing automatically, but ensure your base path in config.yml matches your repository name if you aren't using a custom domain.