Skip to content

fix: correct Playwright interaction selectors and deployment branch m… #2

fix: correct Playwright interaction selectors and deployment branch m…

fix: correct Playwright interaction selectors and deployment branch m… #2

Workflow file for this run

name: E2E Tests & Auto-Deploy
on:
push:
branches:
- '**'
pull_request:
permissions:
contents: write
jobs:
test-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Dependencies
run: npm install
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run E2E Playwright Tests
run: npx playwright test
- name: Conditional Auto-Deploy to Main
if: |
github.event_name == 'push' &&
github.ref != 'refs/heads/main' &&
contains(github.event.head_commit.message, 'MAIN')
run: |
echo "Trigger keyword 'MAIN' detected and tests passed. Executing automatic deployment to main."
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout -B main origin/main
git merge origin/${{ github.ref_name }} --no-edit
git push origin main