Skip to content

Commit

Permalink
move gh-pages branch check before the server wait
Browse files Browse the repository at this point in the history
  • Loading branch information
aasimsyed committed May 18, 2024
1 parent b6da70d commit 11ef769
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/pr_ci_playwright_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@ jobs:
run: |
sudo yarn playwright install --with-deps
- name: Ensure gh-pages branch exists
run: |
git fetch
if ! git show-ref --verify --quiet refs/heads/gh-pages; then
echo "gh-pages branch does not exist. Creating..."
git checkout --orphan gh-pages
git rm -rf .
echo "# GitHub Pages" > index.html
git add index.html
git commit -m "Initial commit"
git push origin gh-pages
fi
- name: Wait for web server to be ready with retry
working-directory: ./frontend
run: |
Expand Down Expand Up @@ -82,19 +95,6 @@ jobs:
run: |
sudo yarn playwright test --reporter=html
- name: Ensure gh-pages branch exists
run: |
git fetch
if ! git show-ref --verify --quiet refs/heads/gh-pages; then
echo "gh-pages branch does not exist. Creating..."
git checkout --orphan gh-pages
git rm -rf .
echo "# GitHub Pages" > index.html
git add index.html
git commit -m "Initial commit"
git push origin gh-pages
fi
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 11ef769

Please sign in to comment.