Skip to content

Commit

Permalink
ci: improve font installation process in ci workflow
Browse files Browse the repository at this point in the history
- add installation of additional fonts in the ci workflow
- increase the font version to "2.1.0" and change the font extension to ".zip"
- update font installation process to include downloading and unzipping fonts from specific urls
- refresh the font cache after installing new fonts
  • Loading branch information
falcucci committed Sep 19, 2024
1 parent 406211a commit 865d414
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,30 @@ jobs:
brew install font-monaspace-nerd-font
brew install font-noto-nerd-font
elif [[ $RUNNER_OS == "Linux" ]]; then
wget https://raw.githubusercontent.com/mcarvalho1/Nerd-fonts-Downloader-Script/master/nf_downloader.sh
chmod +x nf_downloader.sh
./nf_downloader.sh
declare -a fonts=(
"FiraCode"
"Hack"
"JetBrainsMono"
"CascadiaCode"
"UbuntuMono"
)
VERSION="2.1.0"
EXTENSION=".zip"
FONT_DIR="${HOME}/.local/share/fonts"
mkdir -p "$FONT_DIR"
for font in "${fonts[@]}"; do
ZIP_FILE="${font}${EXTENSION}"
DOWNLOAD_URL="https://github.com/ryanoasis/nerd-fonts/releases/download/${VERSION}/${ZIP_FILE}"
echo "Downloading and installing '$font'..."
wget --quiet "$DOWNLOAD_URL" -O "$ZIP_FILE"
unzip -q "$ZIP_FILE" -d "$FONT_DIR"
rm "$ZIP_FILE"
echo "'$font' installed successfully."
done
# Refresh font cache
fc-cache -fv
fi
- name: cargo test
Expand Down

0 comments on commit 865d414

Please sign in to comment.