Skip to content

Base root not working with Gitlab #5282

Closed
@joshuavachon25

Description

What version of astro are you using?

1.6.0

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Windows

Describe the Bug

When I try to deploy a project using Gitlab, all generated files are routed to the root of the Gitlab Group URL and not to the project Root URL.

For example, in my config, my site is define as (not the real URL obviously):
site: https://domain.pages-gitlab.main-domain.com/subgroup/subsubgroup/project/

I can access to my pages with https://domain.pages-gitlab.main-domain.com/subgroup/subsubgroup/project/pages/index.html for example, but all ressources (set in the static folder) or generated ressources (client.727423j.js, style.24884.css...) are routed to https://domain.pages-gitlab.main-domain.com/, but really exist at https://domain.pages-gitlab.main-domain.com/subgroup/subsubgroup/project/...

I tried to use base: /subgroup/subsubgroup/project, but still, it doesn't work.

Any idea why?

The demo is not reproducible, because it's with Gitlab, but I added the gitlab-ci file and the config file.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-4o7l4p?file=astro.config.mjs

Participation

  • I am willing to submit a pull request for this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    needs responseIssue needs response from OP

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions