Skip to content

feat: prependOptions functionality for AsyncAutocompletes #1933

feat: prependOptions functionality for AsyncAutocompletes

feat: prependOptions functionality for AsyncAutocompletes #1933

Workflow file for this run

# .github/workflows/preview.yml
name: Deploy PR previews
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
concurrency: preview-${{ github.event.number }}
permissions:
contents: write
pull-requests: write
jobs:
deploy-preview:
if: ${{ github.event.action != 'closed' && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3
- name: Set Node Version
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 24
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: |
echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Restore yarn cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-24-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-24-yarn-
- name: Install Dependencies
run: yarn install --immutable
- name: Build Packages
run: yarn build
- name: Build Docs
run: yarn build:storybook:ci
- name: Deploy PR Preview
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: dist/storybook
destination_dir: pr-preview/pr-${{ github.event.number }}
keep_files: true
enable_jekyll: false
- name: Comment PR
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '🚀 **Preview deployed!**\n\n📖 [View Storybook Preview](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr-preview/pr-${{ github.event.number }}/)' })
cleanup-preview:
if: ${{ github.event.action == 'closed' && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout gh-pages
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
ref: gh-pages
- name: Remove PR preview
run: |
if [ -d "pr-preview/pr-${{ github.event.number }}" ]; then
rm -rf pr-preview/pr-${{ github.event.number }}
git config user.email ${{ secrets.GH_EMAIL }}
git config user.name ${{ secrets.GH_USER }}
git add .
git commit -m "Remove preview for PR #${{ github.event.number }}"
git push
else
echo "Preview directory not found, nothing to clean up"
fi