I have a homepage in a GitLab repository that I want to create using Hugo extended. The aim is to transfer the homepage to the web server via rsync after it has been created. Here is an incomplete .gitlab-ci.yml that terminates with an error.
dart-sass-embedded (no such package)
This question has come up several times in the forum, unfortunately I could not follow the conversation.
- Question:
Has someone a better solution to transfer the website to the webserver?
- mkdir "${HOME}/.ssh"
- echo "${SSH_HOST_KEY}" > "${HOME}/.ssh/known_hosts"
- echo "${SSH_PRIVATE_KEY}" > "${HOME}/.ssh/id_rsa"
- chmod 700 "${HOME}/.ssh/id_rsa"
- hugo --minify
- rsync -hrvz --delete --exclude=_ public/de/ ...
- rsync -hrvz --delete --exclude=_ public/en/ ...
# Before using this .gitlab-ci.yml:
#
# - This example uses the latest Docker image, but you might want to use the
# exact version to avoid any broken pipelines.
# All available Hugo versions are listed under https://gitlab.com/pages/hugo/container_registry.
# - Read about the difference between hugo and hugo_extended
# https://gitlab.com/pages/hugo/-/blob/main/README.md#hugo-vs-hugo_extended.
# If you don't know what to use, better use the extended version.
# - To change the theme, see
# https://gitlab.com/pages/hugo/-/blob/main/README.md#use-a-custom-theme.
#
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
variables:
HUGO_ENV: production
default:
before_script:
- apk add --no-cache dart-sass-embedded go openssh rsync
test:
script:
- hugo --minify
rules:
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
deploy:
stage: deploy
script:
#- mkdir "${HOME}/.ssh"
#- echo "${SSH_HOST_KEY}" > "${HOME}/.ssh/known_hosts"
#- echo "${SSH_PRIVATE_KEY}" > "${HOME}/.ssh/id_rsa"
#- chmod 700 "${HOME}/.ssh/id_rsa"
- hugo --minify
#- rsync -hrvz --delete --exclude=_ public/de/
#- rsync -hrvz --delete --exclude=_ public/en/
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
Here the error message