Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

ci: adding a comment with the deployment URL for the PR (#257)

白熱25b2a86f66fc
diff --git a/.github/workflows/ci-preview.yml b/.github/workflows/ci-preview.yml
index 3ca054b1cc..9b6a4160e7 100644
--- a/.github/workflows/ci-preview.yml
+++ b/.github/workflows/ci-preview.yml
@@ -8,6 +8,7 @@ on:
permissions:
contents: read
+ pull-requests: write
jobs:
build:
@@ -49,13 +50,13 @@ jobs:
- name: Install dependencies
run: pnpm install
- - name: Build
+ - name: 📦 Build
run: pnpm run build
- - name: Build demo
+ - name: 📦 Build demo
run: pnpm run build:demo
- - name: Deploy to Vercel
+ - name: 🚀 Deploy to Vercel
uses: amondnet/vercel-action@v25
id: vercel-action
with:
@@ -63,7 +64,7 @@ jobs:
vercel-org-id: ${{ secrets.ORG_ID}}
vercel-project-id: ${{ secrets.PROJECT_ID}}
- - name: Discord Notification
+ - name: 👾 Discord Notification
uses: sarisia/actions-status-discord@v1
if: ${{ success() }}
with:
@@ -80,7 +81,7 @@ jobs:
color: 0x00b894
username: GitHub Actions
- - name: Discord Notification
+ - name: 👾 Discord Notification
uses: sarisia/actions-status-discord@v1
if: ${{ failure() }}
with:
@@ -94,3 +95,17 @@ jobs:
nodetail: false
color: 0xd63031
username: GitHub Actions
+
+ - name: 📝 Comment PR
+ uses: actions/github-script@v6
+ with:
+ script: |
+ github.rest.issues.createComment({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ body: `**[View Deployment]**\n` +
+ `- [📝 Doc](${{ steps.vercel-action.outputs.preview-url }}/doc/)\n` +
+ `- [📊 Sheet](${{ steps.vercel-action.outputs.preview-url }}/sheet/)\n` +
+ `- [📽️ Slide](${{ steps.vercel-action.outputs.preview-url }}/slide/)`
+ })