Skip to content

Migrate @kadena/docs to use Vercel CLI to deploy to preview environments. #17

Migrate @kadena/docs to use Vercel CLI to deploy to preview environments.

Migrate @kadena/docs to use Vercel CLI to deploy to preview environments. #17

name: Deploy to Vercel Preview
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_DOCS_ID }}
on:
pull_request:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false
- name: Runner Setup
uses: ./.github/actions/runner-setup
- name: Detecting App Changes
id: changedAction
uses: Trampoline-CX/action-turbo-changed@v1
with:
workspace: "@kadena/docs"
from: origin/${{ github.base_ref }}
- name: Install Vercel CLI
if: steps.changedAction.outputs.changed == 'true'
run: pnpm add --global vercel@34.2.5
- name: Pull Vercel Environment Information
if: steps.changedAction.outputs.changed == 'true'
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build App for Vercel Deployment
if: steps.changedAction.outputs.changed == 'true'
run: vercel build --token=${{ secrets.VERCEL_TOKEN }} --debug
- name: Deploy Project Artifacts to Vercel
if: steps.changedAction.outputs.changed == 'true'
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} --archive=tgz