chore(deps-dev): bump @eslint/json from 1.0.1 to 1.1.0 in /components #1065
Workflow file for this run
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: Clone Demo App & Deploy to Vercel | |
| on: | |
| pull_request: | |
| paths: | |
| - components/** | |
| permissions: | |
| contents: read | |
| packages: read | |
| pull-requests: write | |
| env: | |
| VERCEL_ORG_ID: ${{ vars.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ vars.VERCEL_PROJECT_ID }} | |
| DEMO_APP_REPO: 'schematichq/schematic-next-example' | |
| jobs: | |
| deploy: | |
| runs-on: runs-on=${{ github.run_id }}/runner=4cpu-linux-x64/extras=s3-cache | |
| steps: | |
| - uses: runs-on/action@v2.0.3 | |
| - name: Checkout Components Repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24.x' | |
| - name: Install Vercel CLI | |
| run: yarn global add vercel | |
| - name: Build Components Package | |
| run: | | |
| echo "π¨ Building components package..." | |
| cd components | |
| yarn install | |
| yarn build | |
| - name: Link components | |
| run: | | |
| echo "π¦ Linking components..." | |
| cd components | |
| yarn link | |
| - name: Clone Demo App | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: ${{ env.DEMO_APP_REPO }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| path: schematic-next-example | |
| - name: Setup Demo App & Link Components | |
| run: | | |
| echo "π Setting up demo app..." | |
| cd schematic-next-example | |
| echo "π Linking components to demo app..." | |
| yarn link "@schematichq/schematic-components" | |
| echo "π¦ Installing demo app dependencies..." | |
| yarn install --force | |
| echo "β Components package linked successfully!" | |
| - name: Pull Vercel Environment Information | |
| run: | | |
| cd schematic-next-example | |
| vercel link --yes --scope $VERCEL_ORG_ID --token=${{ secrets.VERCEL_TOKEN }} | |
| vercel env pull --yes --scope $VERCEL_ORG_ID --token=${{ secrets.VERCEL_TOKEN }} | |
| vercel pull --yes --scope $VERCEL_ORG_ID --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Build Project for Vercel | |
| run: | | |
| cd schematic-next-example | |
| echo "ποΈ Building Next.js app for Vercel..." | |
| vercel build --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Deploy to Vercel (Preview) | |
| id: vercel | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| cd schematic-next-example | |
| echo "π Deploying Preview to Vercel..." | |
| DEPLOYMENT_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}) | |
| echo "DEPLOYMENT_URL=$DEPLOYMENT_URL" >> $GITHUB_ENV | |
| echo "Preview URL: $DEPLOYMENT_URL" | |
| - name: Comment PR with Preview URL | |
| if: github.event_name == 'pull_request' && env.DEPLOYMENT_URL | |
| uses: actions/github-script@v8.0.0 | |
| with: | |
| script: | | |
| const deploymentUrl = process.env.DEPLOYMENT_URL; | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: `π **Components Preview Deployed!** | |
| π **Preview URL:** ${deploymentUrl} | |
| π **Components Version:** Built from commit \`${context.sha.substring(0, 7)}\` | |
| π¦ **Demo App:** ${process.env.DEMO_APP_REPO} | |
| ` | |
| }); | |
| - name: Create Deployment Summary | |
| if: always() | |
| run: | | |
| echo "## π Deployment Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| if [ "${{ job.status }}" == "success" ]; then | |
| echo "β **Status:** Deployment completed successfully!" >> $GITHUB_STEP_SUMMARY | |
| echo "π **URL:** ${{ env.DEPLOYMENT_URL }}" >> $GITHUB_STEP_SUMMARY | |
| echo "π¦ **Demo App:** ${{ env.DEMO_APP_REPO }}" >> $GITHUB_STEP_SUMMARY | |
| echo "π **Components:** Built from commit \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "β **Status:** Deployment failed!" >> $GITHUB_STEP_SUMMARY | |
| echo "π Check the workflow logs for details." >> $GITHUB_STEP_SUMMARY | |
| fi |