Skip to content

Merge pull request #2 from code-with-amirhossein/amir78729-patch-2 #13

Merge pull request #2 from code-with-amirhossein/amir78729-patch-2

Merge pull request #2 from code-with-amirhossein/amir78729-patch-2 #13

Workflow file for this run

# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress site to Pages
on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "☁️ checkout repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "🔧 setup pnpm"
uses: pnpm/action-setup@v3
with:
version: 9
- name: "🔧 setup node"
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: "🔧 setup pages"
uses: actions/configure-pages@v4
- name: "📦 install dependencies"
run: pnpm install
# Set up GitHub Actions caching for Wireit.
- name: "🔌 setup wireit cache"
uses: google/wireit@setup-github-actions-caching/v2
- name: "🧱 build docs"
run: pnpm docs:build
- name: "🗄️ upload pages artifact"
uses: actions/upload-pages-artifact@v3
with:
path: .vitepress/dist
- 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 }}
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: "🚀 deploy to github pages"
id: deployment
uses: actions/deploy-pages@v4