From 13e056a0e575d2e9999a11e8331315f187bf3cbf Mon Sep 17 00:00:00 2001 From: BuzzLeclair Date: Fri, 7 Mar 2025 21:17:21 +0100 Subject: [PATCH] modif de la ci --- gitea/workflows/ci.yml | 46 ++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 31 deletions(-) diff --git a/gitea/workflows/ci.yml b/gitea/workflows/ci.yml index 0b4aa2a..f75c963 100644 --- a/gitea/workflows/ci.yml +++ b/gitea/workflows/ci.yml @@ -1,37 +1,21 @@ -name: CI - +name: Vercel Preview Deployment +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} on: push: - branches: + branches-ignore: - main - pull_request: - branches: - - main - jobs: - build: + Deploy-Preview: runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '14' - - - name: Install dependencies - run: npm install - - - name: Run tests - run: npm test - - - name: Build project - run: npm run build - - - name: Deploy to Vercel - env: - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - run: npx vercel --prod --token $VERCEL_TOKEN + - uses: actions/checkout@v2 + - 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 + run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}