This repository was archived by the owner on Aug 5, 2026. It is now read-only.
Mettre à jour le catalogue (scraping) #3
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: Mettre à jour le catalogue (scraping) | |
| on: | |
| schedule: | |
| - cron: '0 6 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| scrape: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout le dépôt | |
| uses: actions/checkout@v4 | |
| - name: Configurer Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Installer les dépendances | |
| run: npm ci | |
| - name: Scraper les catalogues des éditeurs | |
| run: npm run scrape | |
| - name: Commit et push si le catalogue a changé | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add data/ | |
| if git diff --cached --quiet; then | |
| echo "Aucun changement dans data/, rien à commiter." | |
| else | |
| git commit -m "🤖 Mise à jour automatique du catalogue" | |
| git push | |
| fi |