diff --git a/.github/workflows/build-font.yml b/.github/workflows/build-font.yml new file mode 100644 index 0000000..8f86b7d --- /dev/null +++ b/.github/workflows/build-font.yml @@ -0,0 +1,41 @@ +name: Build Stain Font + +on: + push: + branches: + - master + - main + +jobs: + build-font: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + persist-credentials: true + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install deps + run: npm ci || npm install + + - name: Build font + run: npm run build + + - name: Commit dist + run: | + if [ -n "$(git status --porcelain dist)" ]; then + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add dist + git commit -m "chore: build Stain font" + git push + fi