typstyle GitHub Action

June 27, 2025 ยท View on GitHub

GitHub Action to run typstyle, a Typst formatter.

Usage

  1. Create .github/workflows/ci.yml
  2. Configure ci.yml
  3. Commit and push ci.yml

Examples

The following formats all .typ files in branch main on pushes, then pushes the changes. .github/workflows/ci.yml

name: CI
on:
  push:
    branches: main

jobs:
  typstyle:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
    - name: Checkout
      uses: actions/checkout@main
      with:
        ref: ${{ github.head_ref }}
    - name: Run typstyle
      uses: typstyle-rs/typstyle-action@main
    - name: Push
      uses: stefanzweifel/git-auto-commit-action@master
      with:
        commit_message: "style: format using typstyle"

Reporting Issues

Please use GitHub Issues to report bugs, crashes, and other issues.

License

typstyle-action is under the MIT License.