Font Build #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Font Build | |
on: | |
workflow_dispatch: | |
inputs: | |
fontFamily: | |
description: 'Font Family to build' | |
required: true | |
default: 'IosevkaCustom' | |
type: choice | |
options: | |
- IosevkaCustom | |
- IosevkaTermCustom | |
jobs: | |
build: | |
name: Build ${{ inputs.fontFamily }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install ttfautohint | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends ttfautohint | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | |
- name: Cache npm dependencies | |
uses: actions/cache@v4 | |
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true' | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm ci | |
- name: Build ${{ inputs.fontFamily }} | |
run: npm run build -- contents::${{ inputs.fontFamily }} | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: ${{ inputs.fontFamily }} | |
path: dist/ | |
include-hidden-files: true |