starship/.github/workflows/format-workflow.yml
dependabot[bot] a92c2582e6
build: bump dprint/check from 2.0 to 2.1 (#4183)
Bumps [dprint/check](https://github.com/dprint/check) from 2.0 to 2.1.
- [Release notes](https://github.com/dprint/check/releases)
- [Commits](https://github.com/dprint/check/compare/v2.0...v2.1)

---
updated-dependencies:
- dependency-name: dprint/check
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-18 03:05:43 -04:00

43 lines
1.4 KiB
YAML

name: Format + Docs Workflow
on:
push:
paths: ["docs/**", "**.md", "**.toml", "**.js", "**.json", "**.ts"]
pull_request:
paths: ["docs/**", "**.md", "**.toml", "**.js", "**.json", "**.ts"]
jobs:
# Run the dprint code formatter for documentation
dprint:
name: Dprint [Docs Formatter]
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
- name: Docs | Format
uses: dprint/check@v2.1
# Validate preset files
taplo:
name: Taplo [Preset schema validation]
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
- name: Install | Taplo
run: cargo install --debug --locked --version 0.6.3 taplo-cli
- name: Presets | Validate with schema
run: taplo lint --schema "file://${GITHUB_WORKSPACE}/.github/config-schema.json" docs/.vuepress/public/presets/toml/*.toml
# If this is not a Crowdin PR, block changes to translated documentation
block-crowdin:
name: Block Translated Changes
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Prevent File Change
uses: xalvarez/prevent-file-change-action@v1.2.0
if: ${{ github.event.pull_request.head.ref != 'i18n_master' }}
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
pattern: docs/[a-z][a-z][a-z]?-[A-Z][A-Z]?/.*