feat(Combobox): v1 with button-trigger mode, shared popover motion, and curated demos #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docs Preview | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: docs-pages | |
| cancel-in-progress: false | |
| jobs: | |
| build-preview: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Build preview | |
| run: >- | |
| VITEPRESS_BASE=/pr-preview/pr-${{ github.event.pull_request.number }}/ yarn docs:build | |
| - name: Upload preview artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-preview | |
| path: docs/.vitepress/dist | |
| publish-preview: | |
| if: github.event.pull_request.head.repo.full_name == github.repository | |
| needs: build-preview | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout trusted deploy scripts | |
| uses: actions/checkout@v5 | |
| - name: Download preview artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: docs-preview | |
| path: docs/.vitepress/dist | |
| - name: Publish preview | |
| run: >- | |
| bash .github/scripts/docs-pages.sh deploy-preview docs/.vitepress/dist ${{ github.event.pull_request.number }} | |
| - name: Comment preview URL | |
| uses: actions/github-script@v7 | |
| env: | |
| PREVIEW_URL: >- | |
| https://ui.frappe.io/pr-preview/pr-${{ github.event.pull_request.number }}/ | |
| with: | |
| script: | | |
| const marker = '<!-- docs-preview -->' | |
| const body = [ | |
| marker, | |
| '🚀 VitePress preview is ready:', | |
| '', | |
| process.env.PREVIEW_URL, | |
| ].join('\n') | |
| const { owner, repo } = context.repo | |
| const issue_number = context.issue.number | |
| const comments = await github.paginate(github.rest.issues.listComments, { | |
| owner, | |
| repo, | |
| issue_number, | |
| per_page: 100, | |
| }) | |
| const existing = comments.find((comment) => | |
| comment.user?.type === 'Bot' && comment.body?.includes(marker), | |
| ) | |
| if (existing) { | |
| await github.rest.issues.updateComment({ | |
| owner, | |
| repo, | |
| comment_id: existing.id, | |
| body, | |
| }) | |
| } else { | |
| await github.rest.issues.createComment({ | |
| owner, | |
| repo, | |
| issue_number, | |
| body, | |
| }) | |
| } |