Skip to content

Commit

Permalink
fetch the gh-pages branch from the remote, merge any changes if it ex…
Browse files Browse the repository at this point in the history
…ists, or create it if it doesn't exist
  • Loading branch information
aasimsyed committed May 18, 2024
1 parent 0665d14 commit 40fdade
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/pr_ci_playwright_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,29 @@ jobs:
run: |
sudo yarn install
- name: Cache Playwright browsers
uses: actions/cache@v3
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}
restore-keys: |
playwright-browsers-${{ runner.os }}-
- name: Install Playwright Browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
working-directory: ./frontend
run: |
sudo yarn playwright install --with-deps
run: sudo yarn playwright install --with-deps


- name: Ensure gh-pages branch exists
if: always()
run: |
git fetch
if ! git show-ref --verify --quiet refs/heads/gh-pages; then
echo "gh-pages branch does not exist. Creating..."
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
Expand Down

0 comments on commit 40fdade

Please sign in to comment.