diff --git a/.github/workflows/pr_ci_playwright_e2e.yaml b/.github/workflows/pr_ci_playwright_e2e.yaml index c17f18051..db8e68c36 100644 --- a/.github/workflows/pr_ci_playwright_e2e.yaml +++ b/.github/workflows/pr_ci_playwright_e2e.yaml @@ -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 @@ -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: |