Skip to content

Commit 0a0b391

Browse files
authored
reformat
1 parent 8d11414 commit 0a0b391

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build translated docs
1+
name: Build
22

33
on:
44
workflow_dispatch:
@@ -47,31 +47,35 @@ jobs:
4747
- uses: ammaraskar/sphinx-problem-matcher@master
4848
- name: Build docs
4949
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)
5152
env:
5253
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
5955
if: failure()
6056
run: |
61-
sh scripts/prepmsg.sh error.log notify.log
57+
sh scripts/prepmsg.sh logs/error.log logs/notify.log
6258
env:
6359
GITHUB_JOB: ${{ github.job }}
6460
GITHUB_RUN_ID: ${{ github.run_id }}
6561
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
7163
if: failure()
7264
uses: appleboy/telegram-action@master
7365
with:
7466
to: ${{ secrets.TELEGRAM_TO }}
7567
token: ${{ secrets.TELEGRAM_TOKEN }}
7668
format: markdown
7769
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/

0 commit comments

Comments
 (0)