diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index aa7ef0d52..f2e4101c6 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -119,6 +119,23 @@ jobs: path: doc/_build/latex retention-days: 7 + - name: Create issue on documentation build failure + if: failure() && github.event_name == 'schedule' + run: | + # Utiliser les variables GitHub pour éviter les problèmes d'échappement + TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M UTC") + + curl -X POST \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Content-Type: application/json" \ + https://api.github.com/repos/${{ github.repository }}/issues \ + -d '{ + "title": "Documentation build failure on '"nightly"' - '"$TIMESTAMP"'", + "body": "## Documentation Build Failed\n\n**Run:** [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})\n**Commit:** [${{ github.sha }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})\n**Branch:** `${{ github.ref_name }}`\n**Trigger:** ${{ github.event_name }}\n", + "labels": ["documentation", "bug"] + }' + deploy-doc: name: Upload documentation if: contains(github.ref, 'refs/heads/main')