Fusion des workflows de déploiement et RSS quotidien
Some checks are pending
Deploy to Cloudflare Pages / Build and Deploy to Cloudflare Pages (push) Waiting to run
Some checks are pending
Deploy to Cloudflare Pages / Build and Deploy to Cloudflare Pages (push) Waiting to run
Le workflow deploy.yml gère maintenant : - Déploiement à chaque push sur main - Rebuild quotidien à 9h UTC pour mise à jour RSS - Déclenchement manuel si nécessaire Suppression de daily-rss-rebuild.yml devenu redondant.
This commit is contained in:
parent
83753de00d
commit
51ab0eda37
2 changed files with 3 additions and 49 deletions
49
.github/workflows/daily-rss-rebuild.yml
vendored
49
.github/workflows/daily-rss-rebuild.yml
vendored
|
|
@ -1,49 +0,0 @@
|
||||||
name: Daily RSS Feed Rebuild
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
# Tous les jours à 9h UTC (10h CET / 11h CEST)
|
|
||||||
- cron: '0 9 * * *'
|
|
||||||
workflow_dispatch: # Permet de déclencher manuellement le workflow
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
trigger-rebuild:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write # Nécessaire pour push sur le dépôt
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
ref: main
|
|
||||||
|
|
||||||
- name: Créer commit de mise à jour RSS
|
|
||||||
run: |
|
|
||||||
echo "Création du commit quotidien pour mettre à jour les flux RSS..."
|
|
||||||
|
|
||||||
# Configuration git
|
|
||||||
git config user.name "github-actions[bot]"
|
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
|
|
||||||
# Date du jour au format français
|
|
||||||
DATE=$(TZ='Europe/Paris' date '+%d/%m/%Y')
|
|
||||||
|
|
||||||
# Création d'un commit vide
|
|
||||||
git commit --allow-empty -m "Mise à jour RSS du ${DATE}"
|
|
||||||
|
|
||||||
# Push sur main
|
|
||||||
git push origin main
|
|
||||||
|
|
||||||
echo "Commit créé et poussé avec succès"
|
|
||||||
echo "Cloudflare Pages va automatiquement rebuild le site"
|
|
||||||
|
|
||||||
- name: Résumé
|
|
||||||
run: |
|
|
||||||
DATE=$(TZ='Europe/Paris' date '+%d/%m/%Y')
|
|
||||||
echo "## Rebuild quotidien des flux RSS" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "Commit vide créé : 'Mise à jour RSS du ${DATE}'" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "Cloudflare Pages va automatiquement détecter le commit et rebuilder le site." >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "Les flux RSS seront mis à jour avec les articles des dernières 24h." >> $GITHUB_STEP_SUMMARY
|
|
||||||
3
.github/workflows/deploy.yml
vendored
3
.github/workflows/deploy.yml
vendored
|
|
@ -4,6 +4,9 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
schedule:
|
||||||
|
- cron: '0 9 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue