2022-01-21 18:19:56 +01:00
|
|
|
---
|
2022-01-20 09:32:09 +01:00
|
|
|
name: Format + Docs Workflow
|
|
|
|
on:
|
|
|
|
push:
|
2022-01-21 18:19:56 +01:00
|
|
|
paths: ["docs/**", "**.md", "**.toml", "**.js", "**.json", "**.ts"]
|
2022-01-20 09:32:09 +01:00
|
|
|
pull_request:
|
2022-01-21 18:19:56 +01:00
|
|
|
paths: ["docs/**", "**.md", "**.toml", "**.js", "**.json", "**.ts"]
|
2022-01-20 09:32:09 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
# Run the dprint code formatter for documentation
|
|
|
|
dprint:
|
|
|
|
name: Dprint [Docs Formatter]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Setup | Checkout
|
2022-03-02 16:09:45 +01:00
|
|
|
uses: actions/checkout@v3
|
2022-01-20 09:32:09 +01:00
|
|
|
- name: Docs | Format
|
2022-01-21 17:26:13 +01:00
|
|
|
uses: dprint/check@v2.0
|
|
|
|
|
|
|
|
# If this is not a Crowdin PR, block changes to translated documentation
|
|
|
|
block-crowdin:
|
|
|
|
name: Block Translated Changes
|
|
|
|
runs-on: ubuntu-latest
|
2022-01-21 18:19:56 +01:00
|
|
|
if: ${{ github.event_name == 'pull_request' }}
|
2022-01-21 17:26:13 +01:00
|
|
|
steps:
|
|
|
|
- name: Prevent File Change
|
|
|
|
uses: xalvarez/prevent-file-change-action@v1.2.0
|
2022-01-25 09:56:07 +01:00
|
|
|
if: ${{ github.event.pull_request.head.ref != 'i18n_master' }}
|
2022-01-21 17:26:13 +01:00
|
|
|
with:
|
|
|
|
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
pattern: docs/[a-z][a-z][a-z]?-[A-Z][A-Z]?/.*
|