File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : 🎭 Playwright Tests
2-
32on :
43 push :
54 branches : [ main ]
65 pull_request :
76 branches : [ main ]
8-
97permissions :
108 contents : read
119 pages : write
1210 id-token : write
13-
1411jobs :
1512 test-and-deploy :
1613 timeout-minutes : 60
1714 runs-on : ubuntu-latest
18-
15+ environment :
16+ name : github-pages
17+ url : ${{ steps.deployment.outputs.page_url }}
1918 steps :
2019 - name : 📦 Checkout code
2120 uses : actions/checkout@v4
22-
2321 - name : 🟢 Setup Node.js
2422 uses : actions/setup-node@v4
2523 with :
2624 node-version : 18
27-
2825 - name : 📥 Install dependencies
2926 run : npm install
30-
3127 - name : 🎭 Install Playwright browsers
3228 run : npx playwright install --with-deps
33-
3429 - name : 🧪 Run Playwright tests
3530 run : npx playwright test --workers=4
3631 env :
3732 CI : true
3833 continue-on-error : true
39-
4034 - name : 📦 Prepare Pages folder
4135 run : |
4236 mkdir -p _site
4337 cp -r playwright-report/* _site/
4438 ls -la _site
45-
4639 - name : 🏗️ Setup GitHub Pages
47- uses : actions/configure-pages@v3
48-
40+ uses : actions/configure-pages@v4
4941 - name : 📤 Upload Pages artifact
5042 uses : actions/upload-pages-artifact@v3
5143 with :
5244 path : ./_site
53-
5445 - name : 🚀 Deploy to GitHub Pages
55- uses : actions/deploy-pages@v2
56-
46+ id : deployment
47+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
48+ uses : actions/deploy-pages@v4
5749 - name : 📝 Post report URL to summary
5850 run : |
5951 echo "## ✅ Playwright Report" >> $GITHUB_STEP_SUMMARY
You can’t perform that action at this time.
0 commit comments