Enhance your svelte-check experience in GitHub actions by adding both comments and annotations to your PRs.
name: Svelte Check
on:
- pull_request
permissions: {}
jobs:
svelte-check:
runs-on: ubuntu-latest
permissions:
pull-requests: write # Required to be able to comment on PRs
steps:
- name: Checkout
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
persist-credentials: false
- name: Setup PNPM
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
# You can replace these steps with your specific setup steps
# This example assumes Node 24 and pnpm
- name: Setup Node 24
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: pnpm
- name: Install
run: pnpm install
# Run the svelte check action
- name: Svelte Check
uses: ghostdevv/svelte-check-action@7076668a9977fea5afc67b377f4449bb3de5d6e4 # v1.6.0This will add a comment to your PRs with any errors, for example:
and annotations to your changed files tab:
By default the action will only check files that are changed in the pull request. You can customise this behaviour by using the following options:
| Option | Description | Default |
|---|---|---|
paths |
The folder(s) to run svelte-check in, one per line. svelte-kit sync will be ran before diagnostics if SvelteKit is found at the folder package.json. |
. |
filterChanges |
When enabled only the files that change in the pull request will be checked. If a list of globs is provided, we will only apply this filtering to files matching the globs | false |
failOnError |
Should the action fail if there is a svelte-check error? | true |
failOnWarning |
Should the action fail if there is a svelte-check warning? | false |
failFilter |
When failFilter is set and either failOnError or failOnWarning is enabled, the action will only fail on files that match the filter. |
Disabled |
token |
The GitHub token used to authenticate with the GitHub API. By default we use the unique token GitHub generates for each workflow run. | ${{ github.token }} |
You can configure the action by passing the options under the with key, for example:
- name: Svelte Check
uses: ghostdevv/svelte-check-action@7076668a9977fea5afc67b377f4449bb3de5d6e4 # v1.6.0
with:
paths: |
./packages/app- Setting
GITHUB_TOKENenvironment variable is deprecated, please remove it completely if you want to use the default token managed by GitHub - or set your own using thetokenoption.

