Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,29 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Extract PR Description
id: extract
run: |
BODY="${{ github.event.pull_request.body }}"
# Extract from '# Releases' onward
RELEASE_NOTES=$(echo "$BODY" | awk '/^# Releases/{flag=1} flag')
# Save it to an environment variable
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
echo "$RELEASE_NOTES" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV

- name: Send Telegram Message
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
🚀 New Changeset PR Created
🔗 PR: ${{ github.event.pull_request.html_url }}
👤 Author: ${{ github.actor }}
📦 Release Notes:
${{ env.RELEASE_NOTES }}

- name: "🔧 setup pnpm"
uses: pnpm/action-setup@v3
Expand Down Expand Up @@ -59,18 +82,6 @@ jobs:
with:
path: .vitepress/dist

- name: send telegram message on push
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
${{ github.actor }} created commit:
Commit message: ${{ github.event.commits[0].message }}

Repository: ${{ github.repository }}

See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}

deploy:
environment:
Expand Down