modif de la ci
This commit is contained in:
parent
a1b004646f
commit
13e056a0e5
@ -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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches-ignore:
|
||||||
- main
|
- main
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
Deploy-Preview:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v2
|
- name: Install Vercel CLI
|
||||||
|
run: npm install --global vercel@latest
|
||||||
- name: Set up Node.js
|
- name: Pull Vercel Environment Information
|
||||||
uses: actions/setup-node@v2
|
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
|
||||||
with:
|
- name: Build Project Artifacts
|
||||||
node-version: '14'
|
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
|
||||||
|
- name: Deploy Project Artifacts to Vercel
|
||||||
- name: Install dependencies
|
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
|
||||||
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
|
|
||||||
|
Reference in New Issue
Block a user