website-preview.yml 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. name: Preview roocode.com
  2. on:
  3. push:
  4. branches-ignore:
  5. - main
  6. paths:
  7. - 'apps/web-roo-code/**'
  8. workflow_dispatch:
  9. env:
  10. VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
  11. VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
  12. jobs:
  13. preview:
  14. runs-on: ubuntu-latest
  15. if: ${{ secrets.VERCEL_TOKEN != '' }}
  16. steps:
  17. - name: Checkout code
  18. uses: actions/checkout@v4
  19. - name: Setup Node.js and pnpm
  20. uses: ./.github/actions/setup-node-pnpm
  21. - name: Install Vercel CLI
  22. run: npm install --global vercel@canary
  23. - name: Pull Vercel Environment Information
  24. run: npx vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
  25. - name: Build Project Artifacts
  26. run: npx vercel build --token=${{ secrets.VERCEL_TOKEN }}
  27. - name: Deploy Project Artifacts to Vercel
  28. run: npx vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}