|
1 |
| -name:Build translated docs |
| 1 | +name:Build |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | workflow_dispatch:
|
@@ -47,31 +47,35 @@ jobs:
|
47 | 47 | -uses:ammaraskar/sphinx-problem-matcher@master
|
48 | 48 | -name:Build docs
|
49 | 49 | run:|
|
50 |
| - sh scripts/build.sh 2> >(tee -a error.log >&2) |
| 50 | + mkdir logs |
| 51 | + sh scripts/build.sh 2> >(tee -a logs/error.log >&2) |
51 | 52 | env:
|
52 | 53 | LANGUAGE:${{ env.LANGUAGE }}
|
53 |
| - -name:Upload artifact |
54 |
| -uses:actions/upload-artifact@v2 |
55 |
| -with: |
56 |
| -name:python-docs-pt-br |
57 |
| -path:cpython/Doc/build/html |
58 |
| - -name:Prepare error log for notification if it exists |
| 54 | + -name:Prepare notification on error |
59 | 55 | if:failure()
|
60 | 56 | run:|
|
61 |
| - sh scripts/prepmsg.sh error.log notify.log |
| 57 | + sh scripts/prepmsg.shlogs/error.loglogs/notify.log |
62 | 58 | env:
|
63 | 59 | GITHUB_JOB:${{ github.job }}
|
64 | 60 | GITHUB_RUN_ID:${{ github.run_id }}
|
65 | 61 | GITHUB_REPOSITORY:${{ github.repository }}
|
66 |
| - -if:failure() |
67 |
| -run:cat notify.log |
68 |
| - -if:failure() |
69 |
| -run:curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage" -d chat_id=${{ secrets.TELEGRAM_TO }} -d text="$(cat notify.log)" |
70 |
| - -name:Notify via Telegram build errors if any |
| 62 | + -name:Notify via Telegram on build errors if any |
71 | 63 | if:failure()
|
72 | 64 | uses:appleboy/telegram-action@master
|
73 | 65 | with:
|
74 | 66 | to:${{ secrets.TELEGRAM_TO }}
|
75 | 67 | token:${{ secrets.TELEGRAM_TOKEN }}
|
76 | 68 | format:markdown
|
77 | 69 | message_file:notify.log
|
| 70 | + -name:Upload artifact - docs |
| 71 | +if:always() |
| 72 | +uses:actions/upload-artifact@v2 |
| 73 | +with: |
| 74 | +name:docs |
| 75 | +path:cpython/Doc/build/html |
| 76 | + -name:Upload artifact - logs |
| 77 | +if:always() |
| 78 | +uses:actions/upload-artifact@v2 |
| 79 | +with: |
| 80 | +name:build-logs |
| 81 | +path:logs/ |