Skip to content

Commit 2e3a29d

Browse files
committed
deploy: test
1 parent ce5d865 commit 2e3a29d

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/deploy.yaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Astro CI/CD with Playwright & Cloudflare Pages
22

33
on:
44
push:
5-
branches: [main] # ou "master" selon ton projet
5+
branches: [main]
66
pull_request:
77
branches: [main]
88

@@ -21,16 +21,25 @@ jobs:
2121
uses: actions/setup-node@v4
2222
with:
2323
node-version: ${{ env.NODE_VERSION }}
24-
cache: 'npm'
24+
cache: 'pnpm'
25+
26+
- name: 🔧 Enable Corepack
27+
run: corepack enable
28+
29+
- name: 📥 Install pnpm
30+
run: corepack prepare [email protected] --activate
2531

2632
- name: 📦 Install dependencies
27-
run: npm install
33+
run: pnpm install
2834

2935
- name: 🎭 Install Playwright browsers
30-
run: npm run playwright install --with-deps
36+
run: pnpm exec playwright install --with-deps
37+
38+
- name: ✅ Run Playwright tests
39+
run: pnpm exec playwright test
3140

3241
- name: 🛠️ Build Astro
33-
run: npm run build
42+
run: pnpm run build
3443

3544
- name: 🚀 Deploy to Cloudflare Pages
3645
uses: cloudflare/pages-action@v1
@@ -39,4 +48,4 @@ jobs:
3948
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
4049
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
4150
directory: ./dist
42-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
51+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)