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
Gitlab CI + Gitlab Pages #45
Comments
Here's an example of mine deploying to Netlify: image: node:12
# All jobs per branch will use this cache
# More info: https://docs.gitlab.com/ee/ci/caching/
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
before_script:
- node --version
stages:
- deploy
deploy:
stage: deploy
environment:
name: docs
url: https://docs.example.com
only:
- master
script:
- npm install retypeapp
- npm install netlify-cli
- (cd ./docs && npx retype build)
- npx netlify deploy --site $NETLIFY_SITE_ID --auth $NETLIFY_AUTH_TOKEN --dir ./docs/.retype --prod |
This works for us by switching to the full node image from the alpine one. |
Hi @nielsvz. Would you mind sharing your Retype Gitlab CI We can create an official page in the docs for GitLab. |
Here is what I did to get this to work, this will publish the output to GitLab Pages when running in the default branch of the repository.
---
stages:
- build
pages:
stage: build
image: node:lts
before_script:
- npm install --global retypeapp
script:
- 'retype build --override "{ \"url\": \"$CI_PAGES_URL\" }" --output $CI_PROJECT_DIR/public'
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH Ensure you set the An example project can be found on GitLab.com here, the built website can be reached here |
Yep I forgot to say I hade to move to an heavier image (base on debian instead of alpine) -image: node:lts-alpine
+image: node:lts-buster image: node:lts-buster # https://hub.docker.com/_/node
before_script:
- node --version
- npm install --global retypeapp # https://retype.com/guides/getting-started/
pages:
script:
- retype build
- mv site public
artifacts:
paths:
- public
only:
- master |
You wrote a Github Actions + Github pages deploy page. I'd like to PR one for Gitlab CI + Gitlab Pages.
A simple naive CI
gitlab-ci.yml
:I'll PR when I'll have fixed this error:
The text was updated successfully, but these errors were encountered: