File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Astro CI/CD with Playwright & Cloudflare Pages
2+
3+ on :
4+ push :
5+ branches : [main] # ou "master" selon ton projet
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ test-and-deploy :
11+ runs-on : ubuntu-latest
12+
13+ env :
14+ NODE_VERSION : 20
15+
16+ steps :
17+ - name : ⬇️ Checkout repository
18+ uses : actions/checkout@v3
19+
20+ - name : 🟢 Setup Node.js
21+ uses : actions/setup-node@v4
22+ with :
23+ node-version : ${{ env.NODE_VERSION }}
24+ cache : ' pnpm'
25+
26+ - name : 📦 Install dependencies
27+ run : |
28+ corepack enable
29+ pnpm install
30+
31+ - name : 🎭 Install Playwright browsers
32+ run : pnpm exec playwright install --with-deps
33+
34+ - name : 🛠️ Build Astro
35+ run : pnpm run build
36+
37+ - name : 🚀 Deploy to Cloudflare Pages
38+ uses : cloudflare/pages-action@v1
39+ with :
40+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
41+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
42+ projectName : ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
43+ directory : ./dist
44+ gitHubToken : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments