Closed adam-hudak closed 3 months ago
By reading https://docs.gitlab.com/ee/user/project/pages/introduction.html#customize-the-default-folder
We can instead tell GitLab to look at the dist/
directory instead @adam-hudak
pages:
script:
- npm run generate
artifacts:
paths:
- dist
publish: dist
Thank you for your comments @alexchopin , @pi0 .
I updated the documentation, remove everything that we don't need and now there is a clean, minimalistic page โค๏ธ
It's beautiful how easy it is to deploy the Nuxt app. Good job guys ๐
Yes @pi0 , I would like to help. So what you suggest is to write a preset that build an application to /public directory?
@adam-hudak you can take a look at the github pages preset for Nitro: https://github.com/unjs/nitro/blob/main/src/presets/github-pages.ts
@Atinux I also checked other presets in the codebase before, but I think I don't understand what is a function of a preset.
From documentation:
Nitro can generate different output formats suitable for different hosting providers from the same code base. Using built-in presets, you can easily configure Nitro to adjust its output format with almost no additional code or configuration!
What output format
do I want to achieve? When I look at the differences between presets/github-pages.ts
and presents/nitro-dev.ts
. I can see that github-pages uses extends: "static"
, then render 404 page and github specific file .nojekyll. github-pages.ts
also define a deploy command
, but then in GitHub Pages documentation we define the other deploy job
.
For GitLab we also need extends: "static"
. But I don't understand how it affects Nuxt GitLab Pages deployment process.
Please can you help me understand it better? I am looking for a solution that is not framework specific and would like to know the best approach to achieve this.
Thank you
๐ Linked issue
resolves https://github.com/nuxt/nuxt/issues/26599
โ Type of change
๐ Description
Add GitLab Pages deploy option
๐ Checklist