Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: split deploy and update pr #1670

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,14 @@ jobs:
echo "diff=$diff" >> $GITHUB_OUTPUT
echo "percent=$percent" >> $GITHUB_OUTPUT
deploy_and_update:
name: Deploy and Update PR
needs: [e2e_tests, bundle_size]
deploy_report:
name: Deploy Test Report
needs: [e2e_tests]
if: ${{always() && (github.ref == 'refs/heads/main' || github.event.pull_request.head.repo.full_name == github.repository)}}
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
pull-requests: write

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -229,9 +228,27 @@ jobs:
destination_dir: .
force_orphan: true

update_pr:
name: Update PR Description
needs: [e2e_tests, bundle_size]
if: ${{always() && github.event_name == 'pull_request'}}
runs-on: ubuntu-latest
permissions:
pull-requests: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download Playwright artifacts
uses: actions/download-artifact@v3
with:
name: playwright-artifacts
path: playwright-artifacts

- name: Count new tests
id: count_tests
if: github.event_name == 'pull_request'
run: |
git fetch origin main:main
new_tests=0
Expand Down Expand Up @@ -259,7 +276,6 @@ jobs:
echo "new_tests=$new_tests" >> $GITHUB_OUTPUT
- name: Update PR description
if: github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
Expand Down
Loading