Skip to content

Commit 9e69a34

Browse files
authored
Merge pull request #166 from lourduradjou/main
✨ Moving to PNPM and adapting CI/CD pipeline #140
2 parents a4f4e5a + 83b5295 commit 9e69a34

File tree

144 files changed

+9745
-14082
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+9745
-14082
lines changed

.github/workflows/preview.yaml

Lines changed: 23 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,28 @@
11
name: Vercel Preview Deployment
22

3-
env:
4-
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
5-
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
6-
73
on:
8-
push:
9-
branches-ignore:
10-
- main
11-
12-
jobs:
13-
14-
Test:
15-
runs-on: ubuntu-latest
16-
steps:
17-
18-
- uses: actions/checkout@v3
19-
20-
- uses: actions/setup-node@v3
21-
with:
22-
node-version: 18
23-
24-
- run: npm ci
4+
pull_request:
5+
branches:
6+
- main
257

26-
- run: npm run test:prod
27-
28-
Deploy-Preview:
29-
needs: [Test]
30-
runs-on: ubuntu-latest
31-
steps:
32-
33-
- uses: actions/checkout@v3
34-
35-
- name: Install Vercel CLI
36-
run: npm install --global vercel
37-
38-
- name: Pull Vercel Environment Information
39-
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
40-
41-
- name: Build Project Artifacts
42-
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
8+
env:
9+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
10+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
4311

44-
- name: Deploy Project Artifacts
45-
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
12+
jobs:
13+
deploy-preview:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v4
21+
with:
22+
version: 10.13.1
23+
24+
- name: Install dependencies
25+
run: pnpm install --frozen-lockfile
26+
27+
- name: Deploy to Vercel
28+
run: pnpm dlx vercel --token=${{ secrets.VERCEL_TOKEN }} --yes

.github/workflows/production.yaml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
name: Vercel Production Deployment
22

3-
env:
4-
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
5-
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
6-
73
on:
8-
push:
9-
branches:
10-
- main
11-
12-
jobs:
13-
Deploy-Production:
14-
runs-on: ubuntu-latest
15-
steps:
16-
17-
- uses: actions/checkout@v3
4+
push:
5+
branches:
6+
- main
187

19-
- name: Install Vercel CLI
20-
run: npm install --global vercel
21-
22-
- name: Pull Vercel Environment Information
23-
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
24-
25-
- name: Build Project Artifacts
26-
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
8+
env:
9+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
10+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
2711

28-
- name: Deploy Project Artifacts
29-
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
12+
jobs:
13+
deploy-production:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v4
21+
with:
22+
version: 10.13.1
23+
24+
- name: Install dependencies
25+
run: pnpm install --frozen-lockfile
26+
27+
- name: Deploy to Vercel
28+
run: pnpm dlx vercel --cwd frontend --prod --token=${{ secrets.VERCEL_TOKEN }} --yes

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,33 @@ Amour Editorials was founded by Akshai Krishna A and Lathika D with the mission
9191
| Frontend Hosting | Vercel |
9292
| Backend Hosting | Render / Railway / AWS / Cyclic |
9393
| DB (Optional) | Supabase / MongoDB Atlas |
94-
| CI/CD | GitHub Actions (optional) |
94+
| CI/CD | GitHub Actions |
9595

9696
---
9797

9898
## 🚀 Installation
9999

100100
### Prerequisites:
101101
- Node.js ≥ 18.x
102-
- npm9.x
102+
- pnpm10.13.1
103103

104104
### Clone the Repository
105105

106-
```bash
106+
bash
107107
git clone https://github.com/sneha-94/Amour-Editorial-Website.git
108108
cd Amour-Editorial-Website
109-
npm run start
110-
```
109+
110+
# Install all dependencies for frontend + backend in one go
111+
pnpm install
112+
113+
# Start both frontend and backend together
114+
pnpm dev
115+
116+
# Run only the frontend (from the root folder)
117+
pnpm run dev:fe
118+
119+
# Run only the backend (from the root folder)
120+
pnpm run dev:be
111121

112122
> Access frontend: `http://localhost:3000`
113123
> Access backend: `http://localhost:5000` (or your configured port)

0 commit comments

Comments
 (0)