From d30a5ef73df3756d65c62786f71e2d15969689e9 Mon Sep 17 00:00:00 2001 From: Khemarato Bhikkhu Date: Thu, 3 Jul 2025 15:13:07 +0700 Subject: [PATCH] Improve Dart Sass Installation in Example Workflow --- .../host-on-github-pages/index.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/content/en/host-and-deploy/host-on-github-pages/index.md b/content/en/host-and-deploy/host-on-github-pages/index.md index d01f88c57..796c3375f 100644 --- a/content/en/host-and-deploy/host-on-github-pages/index.md +++ b/content/en/host-and-deploy/host-on-github-pages/index.md @@ -116,7 +116,23 @@ jobs: wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ && sudo dpkg -i ${{ runner.temp }}/hugo.deb - name: Install Dart Sass - run: sudo snap install dart-sass + env: + GH_TOKEN: ${{ github.token }} + run: | + # Get latest release name + VERSION=$(gh api repos/sass/dart-sass/releases/latest --jq .tag_name) + + # Build file and download URL + FILE="dart-sass-${VERSION}-linux-x64.tar.gz" + URL="https://github.com/sass/dart-sass/releases/download/${VERSION}/${FILE}" + + # Download and extract + cd ${{ runner.temp }} + curl -L -o $FILE $URL + tar -xzf $FILE + + # Install binaries + sudo mv dart-sass/* /usr/local/bin/ - name: Checkout uses: actions/checkout@v4 with: