Update JSON Data #254
This file contains hidden or 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: Update JSON Data | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # Tous les jours à minuit | |
| workflow_dispatch: | |
| jobs: | |
| update-data: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download JSON | |
| run: | | |
| curl -o src/assets/json/platform_pie.json https://co.ifremer.fr/co/co040702/co-argoGdac/json/platform_pie.json | |
| curl -o src/assets/json/histogram_gdac.json https://co.ifremer.fr/co/co040702/co-argoGdac/json/histogram_gdac.json | |
| curl -o src/assets/json/histogram_gdac_delayed.json https://co.ifremer.fr/co/co040702/co-argoGdac/json/histogram_gdac_delayed.json | |
| curl -o src/assets/csv/stations-argo-12months.csv https://co.ifremer.fr/co/co040702/co-argoGdac/csv/stations-argo-12months.csv | |
| - name: Commit changes | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add src/assets/json/platform_pie.json | |
| git add src/assets/json/histogram_gdac.json | |
| git add src/assets/json/histogram_gdac_delayed.json | |
| git add src/assets/csv/stations-argo-12months.csv | |
| git diff --quiet && git diff --staged --quiet || git commit -m "Update platform_pie.json" | |
| git push |