-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Add GitLab Pages deploy option #1548
docs: Add GitLab Pages deploy option #1548
Conversation
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 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 π |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks overall looks good but we still need a Nitro preset to officially support this target, if you like to help.
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: What For GitLab we also need 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 |
image: node:lts | ||
# Functions that should be executed before the build script is run | ||
before_script: | ||
- npm install | ||
cache: | ||
paths: | ||
# Directories that are cached between builds | ||
- node_modules/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I came across this by chance. I would not set this part globally, but only give it directly to the pages
job. Otherwise this part would potentially be breaking for other jobs in the pipeline :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to open another PR to update it @OrbisK ? π
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to open another PR to update it @OrbisK ? π
Sure, ill do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the comment on cache.paths
, is there any reason not to merge this, and then update when we have a Nitro preset?
π Linked issue
resolves nuxt/nuxt#26599
β Type of change
π Description
Add GitLab Pages deploy option
π Checklist