File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Astro CI/CD with Playwright & Cloudflare Pages
2
2
3
3
on :
4
4
push :
5
- branches : [main] # ou "master" selon ton projet
5
+ branches : [main]
6
6
pull_request :
7
7
branches : [main]
8
8
@@ -21,16 +21,25 @@ jobs:
21
21
uses : actions/setup-node@v4
22
22
with :
23
23
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
25
31
26
32
- name : 📦 Install dependencies
27
- run : npm install
33
+ run : pnpm install
28
34
29
35
- 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
31
40
32
41
- name : 🛠️ Build Astro
33
- run : npm run build
42
+ run : pnpm run build
34
43
35
44
- name : 🚀 Deploy to Cloudflare Pages
36
45
uses : cloudflare/pages-action@v1
39
48
accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
40
49
projectName : ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
41
50
directory : ./dist
42
- gitHubToken : ${{ secrets.GITHUB_TOKEN }}
51
+ gitHubToken : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments