Error to install Dart-Sass

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.

  1. 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

I use this workflow:

https://gohugo.io/hosting-and-deployment/hosting-on-gitlab/#configure-gitlab-cicd

Works great.

There is no such Alpine package anymore, but you can use dart-sass instead.

Please note that the dart-sass packages is available in testing repository, I use the following code snippet to build my own image, hope it helps.

FROM alpine:edge
RUN apk add dart-sass --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
RUN apk add --no-cache dart-sass

This is no longer the repository for Embedded Dart Sass. The embedded compiler has been merged into the primary Dart Sass repository, and further releases will be included as part of Dart Sass itself. The embedded compiler can be accessed by running sass --embedded . —— GitHub - sass/dart-sass-embedded: A wrapper for Dart Sass that implements the compiler side of the Embedded Sass protocol

Thank you @jmooring and @razon.

I have checked both solutions. Great.