From e83f3ce0d8fae5554f60f59ded7a82b4a6828a51 Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Sat, 8 Nov 2025 22:40:59 -0800 Subject: [PATCH] Feat: CI build and commit generated font --- .github/workflows/build-font.yml | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/build-font.yml diff --git a/.github/workflows/build-font.yml b/.github/workflows/build-font.yml new file mode 100644 index 0000000..3540403 --- /dev/null +++ b/.github/workflows/build-font.yml @@ -0,0 +1,42 @@ +name: Build and Commit StainFont + +on: + push: + branches: [ "master", "main" ] + workflow_dispatch: {} + +jobs: + build-font: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Install dependencies + run: npm ci || npm install + + - name: Build font + run: npm run build:font + + - name: Commit generated fonts + run: | + if [ -n "$(git status --porcelain dist)" ]; then + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add dist + git commit -m "chore: build StainFont Basic" + git push + else + echo "No changes in dist; skipping commit." + fi