Skip to content

Commit

Permalink
WorkFlow Update
Browse files Browse the repository at this point in the history
  • Loading branch information
nahidthenh committed Jan 1, 2025
1 parent 05a2561 commit 7592174
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Playwright Tests for Chromium and Publish Report to GitHub Pages
name: Run Playwright Tests and Publish Report to GitHub Pages

on:
push:
Expand All @@ -25,24 +25,14 @@ jobs:

- name: Run Playwright tests for Chromium
run: npx playwright test --project=chromium --workers=4
continue-on-error: true
continue-on-error: true # Ensures workflow continues even if tests fail

- name: Generate HTML Report
- name: Move HTML Report
run: mv playwright-report /tmp/playwright-report

- name: Set up GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: /tmp/playwright-report

- name: Commit HTML report to gh-pages
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git checkout -b gh-pages
cp -r /tmp/playwright-report/* ./
git add .
git commit -m "Publish Playwright HTML report"
git push --force origin gh-pages
publish_branch: gh-pages # Corrected parameter
publish_dir: /tmp/playwright-report # Corrected parameter

0 comments on commit 7592174

Please sign in to comment.