This repository was archived by the owner on Aug 5, 2026. It is now read-only.
Publier un livre sur Mastodon #33
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: Publier un livre sur Mastodon | |
| on: | |
| schedule: | |
| - cron: '0 7 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| environment: mastodon-bot | |
| permissions: | |
| contents: read | |
| actions: read | |
| 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: Vérifier la présence des secrets | |
| run: | | |
| if [ -n "${{ secrets.MASTODON_ACCESS_TOKEN }}" ]; then echo "TOKEN défini"; else echo "TOKEN manquant"; exit 1; fi | |
| if [ -n "${{ secrets.MASTODON_BASE_URL }}" ]; then echo "URL définie"; else echo "URL manquante"; exit 1; fi | |
| - name: Installer les dépendances | |
| run: npm ci | |
| - name: Publier le livre (avec logs détaillés) | |
| env: | |
| MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }} | |
| MASTODON_BASE_URL: ${{ secrets.MASTODON_BASE_URL }} | |
| run: | | |
| node --trace-warnings index.js |