Skip to content

Commit bb4dcdc

Browse files
committed
feat: add workflow for deployment
1 parent 2a0767b commit bb4dcdc

File tree

4 files changed

+58
-1
lines changed

4 files changed

+58
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Deploy to Vercel
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
env:
8+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
9+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
10+
11+
jobs:
12+
checks:
13+
name: Lint & Test
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 22
23+
cache: npm
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Lint
29+
run: npm run lint
30+
31+
- name: Format check
32+
run: npm run format:check
33+
34+
- name: Run tests
35+
run: npm test
36+
37+
deploy:
38+
name: Deploy Production
39+
needs: checks
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
45+
- name: Install Vercel CLI
46+
run: npm install -g vercel
47+
48+
- name: Pull Vercel environment
49+
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
50+
51+
- name: Build
52+
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
53+
54+
- name: Deploy to Vercel
55+
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ yarn-error.log*
3939
# typescript
4040
*.tsbuildinfo
4141
next-env.d.ts
42+
.env*.local

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.21.1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Puedes registrarte con cualquier email y contraseña (mínimo 6 caracteres) o us
138138

139139
El proyecto está desplegado en Vercel:
140140

141-
- URL: [https://form-craft.vercel.app/]
141+
- URL: [https://form-craft-pi.vercel.app](https://form-craft-pi.vercel.app)
142142

143143
## Licencia
144144

0 commit comments

Comments
 (0)