Node.js CI #17373
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
| # Cette workflow réalisera une installation propre des dépendances node, les mettra en cache/restaurera, compilera le code source et exécutera des tests sur différentes versions de node | |
| # Pour plus d'informations, voir : https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
| name: Node.js CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| schedule: | |
| - cron: '0/15 * * * *' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| strategy: | |
| matrix: | |
| node-version: [ 23.x] | |
| # Voir le calendrier de sortie supporté de Node.js à https://nodejs.org/en/about/releases/ | |
| steps: | |
| - uses: actions/checkout@v4 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Utiliser Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - run: npm i thomas-iniguez-visioli/hexo-generator-feed | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - run: npm run build --if-present | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - run: node indexator | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: stefanzweifel/git-auto-commit-action@v7.1.0 | |
| with: | |
| commit_message: Mise à jour de l'indexation des articles | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - run: npx hexo generate &&npx hexo deploy | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.TOKEN }} |