[V2] Adiciona suporte a múltiplas línguas usando Jekyll Polyglot #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sort data files | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "assets/data/**" | |
pull_request: | |
paths: | |
- "assets/data/**" | |
workflow_dispatch: | |
jobs: | |
sort-data: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Get changed data files | |
id: changed-data | |
uses: tj-actions/changed-files@v45.0.4 | |
with: | |
files: assets/data/**.json | |
- name: Setup Python | |
if: steps.changed-data.outputs.any_changed == 'true' | |
uses: actions/setup-python@v5.3.0 | |
with: | |
python-version: "3.12" | |
- name: Sort data files | |
if: steps.changed-data.outputs.any_changed == 'true' | |
env: | |
ALL_CHANGED_FILES: ${{ steps.changed-data.outputs.all_changed_files }} | |
run: | | |
for file in $ALL_CHANGED_FILES; do | |
echo "Formatting $file" | |
python3 format_data.py -f $file | |
done | |
# commit all changed files back to the repository | |
- uses: stefanzweifel/git-auto-commit-action@v5.0.1 | |
if: steps.changed-data.outputs.any_changed == 'true' | |
with: | |
commit_message: Sort data files |