Skip to content

Commit

Permalink
chore: update cicd script
Browse files Browse the repository at this point in the history
  • Loading branch information
frattezi committed Jun 15, 2024
1 parent b31cf1f commit 7247566
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 15 deletions.
52 changes: 38 additions & 14 deletions .github/workflows/merge-request.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,49 @@
name: Merge Request Quality Gate
name: Deploy to Vercel

on: pull_request

jobs:
lint-and-build:
lint-and-test:
runs-on: ubuntu-latest
name: Lint and build

steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v3

- name: Setup node 20
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 20

- name: Install dependencies
run: yarn
- name: Install dependencies
run: yarn

- name: Lint code
run: yarn lint
- name: Run lint
run: yarn lint

- name: Check build
run: yarn build
# - name: Run tests
# run: yarn test

build-and-deploy:
runs-on: ubuntu-latest
needs: lint-and-test

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install dependencies
run: yarn

- name: Run database migrations
run: npx prisma migrate dev

- name: Deploy to Vercel
run: vercel --prod
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"cSpell.words": ["biomejs", "lefthook", "tailwindcss"]
"cSpell.words": ["biomejs", "lefthook", "tailwindcss", "Vercel"]
}

0 comments on commit 7247566

Please sign in to comment.