Skip to content

83 migrate to solid object #9

83 migrate to solid object

83 migrate to solid object #9

Workflow file for this run

name: Vercel Preview Deployment
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
concurrency:
group: preview-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
Deploy-Preview:
runs-on: ubuntu-latest
if: >-
github.event_name == 'workflow_dispatch' ||
github.event.pull_request.head.repo.full_name == github.repository
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v5
- name: Set up Node.js version
uses: actions/setup-node@v5
with:
node-version: 22
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
id: deploy
run: |
url=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | tail -n1)
echo "url=$url" >> "$GITHUB_OUTPUT"
- name: Comment the preview URL on the pull request
if: github.event_name == 'pull_request'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
URL: ${{ steps.deploy.outputs.url }}
run: |
gh pr comment ${{ github.event.pull_request.number }} \
--repo ${{ github.repository }} \
--edit-last --create-if-none \
--body "Preview deployment: $URL"