From 0e248a72e364706b39214657dc5ab6c1dcf5f205 Mon Sep 17 00:00:00 2001 From: Chris Estreich Date: Tue, 3 Jun 2025 15:52:31 -0700 Subject: [PATCH] Add vercel deploy workflows (#4302) --- .github/workflows/website-deploy.yml | 25 +++++++++++++++++++++++++ .github/workflows/website-preview.yml | 25 +++++++++++++++++++++++++ .gitignore | 1 + 3 files changed, 51 insertions(+) create mode 100644 .github/workflows/website-deploy.yml create mode 100644 .github/workflows/website-preview.yml diff --git a/.github/workflows/website-deploy.yml b/.github/workflows/website-deploy.yml new file mode 100644 index 0000000000..5e8423fee2 --- /dev/null +++ b/.github/workflows/website-deploy.yml @@ -0,0 +1,25 @@ +name: Deploy roocode.com + +on: + workflow_dispatch: + +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Setup Node.js and pnpm + uses: ./.github/actions/setup-node-pnpm + - name: Install Vercel CLI + run: npm install --global vercel@canary + - name: Pull Vercel Environment Information + run: npx vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + - name: Build Project Artifacts + run: npx vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy Project Artifacts to Vercel + run: npx vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} diff --git a/.github/workflows/website-preview.yml b/.github/workflows/website-preview.yml new file mode 100644 index 0000000000..cb13eaec15 --- /dev/null +++ b/.github/workflows/website-preview.yml @@ -0,0 +1,25 @@ +name: Preview roocode.com + +on: + workflow_dispatch: + +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + +jobs: + preview: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Setup Node.js and pnpm + uses: ./.github/actions/setup-node-pnpm + - name: Install Vercel CLI + run: npm install --global vercel@canary + - name: Pull Vercel Environment Information + run: npx vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} + - name: Build Project Artifacts + run: npx vercel build --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy Project Artifacts to Vercel + run: npx vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} diff --git a/.gitignore b/.gitignore index 492d92b982..0c032bbf76 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ logs # IntelliJ and Qodo plugin folders .idea/ .qodo/ +.vercel