Skip to content

Do not pull LFS when updating the doc #4

Do not pull LFS when updating the doc

Do not pull LFS when updating the doc #4

Workflow file for this run

on:
pull_request_target:
types: [assigned, opened, synchronize, reopened, labeled]
branches:
- main
name: Style Checks
jobs:
#----------------------------------------------------------------------------
# Style checks
#----------------------------------------------------------------------------
style_checks:
name: Formatting Check
runs-on: ubuntu-latest
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 1
lfs: false
# Run codespell first to avoid issues with style check on same location
- name: Codespell in place
shell: bash
run: |
pip install codespell
codespell -fHw .
- name: Prettier Formatting
continue-on-error: true
uses: creyD/[email protected]
with:
dry: True
prettier_options: "-w **/*.{ts,tsx,js,json,md,html,yml}"
- name: Echo Diff
shell: bash
run: git diff --color=always --exit-code
- name: Generate Diff
if: failure()
shell: bash
run: |
diff=$(git diff)
echo "$diff" > ./f3d_style_checks_diff.patch
{
echo 'F3D_STYLE_DIFF<<EOF'
echo "$diff"
echo EOF
} >> "$GITHUB_ENV"
- name: Upload diff as an artifact
if: failure()
uses: actions/upload-artifact@v4
with:
path: ./f3d_style_diff.patch
name: f3d-style-checks-diff-${{ github.event.pull_request.head.ref }}
- name: Delete comment
uses: marocchino/sticky-pull-request-comment@v2
with:
header: style
delete: true
- name: Create comment
if: failure()
uses: marocchino/sticky-pull-request-comment@v2
with:
header: style
message: |
Style Checks CI failed:
```diff
${{env.F3D_STYLE_DIFF}}
```