Skip to content

Commit 63ceac6

Browse files
authored
Merge pull request #1 from code-with-amirhossein/amir78729-patch-1
Update deploy.yml
2 parents edae4de + f0e0c84 commit 63ceac6

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,29 @@ jobs:
2929
uses: actions/checkout@v4
3030
with:
3131
fetch-depth: 0
32+
33+
- name: Extract PR Description
34+
id: extract
35+
run: |
36+
BODY="${{ github.event.pull_request.body }}"
37+
# Extract from '# Releases' onward
38+
RELEASE_NOTES=$(echo "$BODY" | awk '/^# Releases/{flag=1} flag')
39+
# Save it to an environment variable
40+
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
41+
echo "$RELEASE_NOTES" >> $GITHUB_ENV
42+
echo "EOF" >> $GITHUB_ENV
43+
44+
- name: Send Telegram Message
45+
uses: appleboy/telegram-action@master
46+
with:
47+
to: ${{ secrets.TELEGRAM_TO }}
48+
token: ${{ secrets.TELEGRAM_TOKEN }}
49+
message: |
50+
🚀 New Changeset PR Created
51+
🔗 PR: ${{ github.event.pull_request.html_url }}
52+
👤 Author: ${{ github.actor }}
53+
📦 Release Notes:
54+
${{ env.RELEASE_NOTES }}
3255
3356
- name: "🔧 setup pnpm"
3457
uses: pnpm/action-setup@v3
@@ -59,18 +82,6 @@ jobs:
5982
with:
6083
path: .vitepress/dist
6184

62-
- name: send telegram message on push
63-
uses: appleboy/telegram-action@master
64-
with:
65-
to: ${{ secrets.TELEGRAM_TO }}
66-
token: ${{ secrets.TELEGRAM_TOKEN }}
67-
message: |
68-
${{ github.actor }} created commit:
69-
Commit message: ${{ github.event.commits[0].message }}
70-
71-
Repository: ${{ github.repository }}
72-
73-
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}
7485

7586
deploy:
7687
environment:

0 commit comments

Comments
 (0)