From 4f6b41e264b891b386b94d48d6c4c17b2e475838 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Sun, 15 Dec 2024 18:59:20 -0600 Subject: [PATCH] feat: start work on website deployment --- .../{build-website.yml => website.yml} | 38 +++++++++++++++---- .vscode/settings.json | 1 + 2 files changed, 31 insertions(+), 8 deletions(-) rename .github/workflows/{build-website.yml => website.yml} (70%) diff --git a/.github/workflows/build-website.yml b/.github/workflows/website.yml similarity index 70% rename from .github/workflows/build-website.yml rename to .github/workflows/website.yml index cfa126071..c09345069 100644 --- a/.github/workflows/build-website.yml +++ b/.github/workflows/website.yml @@ -1,8 +1,7 @@ -name: Build Website +name: Website on: push: - branches: main workflow_dispatch: schedule: @@ -52,14 +51,37 @@ jobs: with: path: dist/website - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - needs: build - runs-on: ubuntu-latest + deploy-github-pages: + if: github.ref == 'refs/heads/main' + name: Deploy + runs-on: ubuntu-latest + needs: build + environment: + name: Production + url: ${{ steps.deployment.outputs.page_url }} + steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 + + deploy-vercel: + name: Deploy + needs: build + runs-on: ubuntu-latest + environment: + name: Preview + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - uses: oven-sh/setup-bun@v1 + + - name: Install Vercel CLI + run: bun install --global vercel@latest + + - name: Pull Vercel environment information + run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} + + - name: Deploy project artifacts to vercel + run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} diff --git a/.vscode/settings.json b/.vscode/settings.json index a263f4dd4..6be5a5ada 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -189,6 +189,7 @@ "unpickled", "Unregistering", "unrotate", + "vercel", "vickers", "vitepress", "Vovko",