Skip to content

Commit

Permalink
moved gh-pages check to after server wait
Browse files Browse the repository at this point in the history
  • Loading branch information
aasimsyed committed May 18, 2024
1 parent 40fdade commit bd326a5
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/pr_ci_playwright_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,6 @@ jobs:
working-directory: ./frontend
run: sudo yarn playwright install --with-deps


- name: Ensure gh-pages branch exists
if: always()
run: |
git fetch origin gh-pages
if git rev-parse --verify origin/gh-pages; then
git checkout gh-pages
git reset --hard origin/gh-pages
else
git checkout --orphan gh-pages
git rm -rf .
echo "# GitHub Pages" > index.html
git add index.html
git -c user.name='github-actions[bot]' -c user.email='github-actions[bot]@users.noreply.github.com' commit -m "Initial commit"
git push origin gh-pages
fi
- name: Wait for web server to be ready with retry
run: |
MAX_ATTEMPTS=3
Expand All @@ -102,6 +85,22 @@ jobs:
fi
done
- name: Ensure gh-pages branch exists
if: always()
run: |
git fetch origin gh-pages
if git rev-parse --verify origin/gh-pages; then
git checkout gh-pages
git reset --hard origin/gh-pages
else
git checkout --orphan gh-pages
git rm -rf .
echo "# GitHub Pages" > index.html
git add index.html
git -c user.name='github-actions[bot]' -c user.email='github-actions[bot]@users.noreply.github.com' commit -m "Initial commit"
git push origin gh-pages
fi
- name: Run Playwright tests
working-directory: ./frontend
run: |
Expand Down

0 comments on commit bd326a5

Please sign in to comment.