Skip to content

Commit 2ec9cf4

Browse files
Anton StandrikAnton Standrik
authored andcommitted
chore: try fix deploy report on main branch
1 parent 09b6784 commit 2ec9cf4

File tree

1 file changed

+45
-45
lines changed

1 file changed

+45
-45
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,51 @@ jobs:
120120
echo "flaky=$flaky" >> $GITHUB_OUTPUT
121121
echo "skipped=$skipped" >> $GITHUB_OUTPUT
122122
123+
deploy_report:
124+
name: Deploy Test Report
125+
needs: [e2e_tests]
126+
if: ${{always() && (github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository))}}
127+
runs-on: ubuntu-latest
128+
permissions:
129+
contents: write
130+
pages: write
131+
132+
steps:
133+
- uses: actions/checkout@v4
134+
with:
135+
fetch-depth: 0
136+
137+
- name: Fetch gh-pages branch
138+
run: |
139+
git fetch origin gh-pages:gh-pages
140+
mkdir gh-pages
141+
git --work-tree=gh-pages checkout gh-pages -- .
142+
143+
- name: Download Playwright artifacts
144+
uses: actions/download-artifact@v3
145+
with:
146+
name: playwright-artifacts
147+
path: playwright-artifacts
148+
149+
- name: Copy new report
150+
run: |
151+
if [ "${{ github.event_name }}" = "pull_request" ]; then
152+
REPORT_DIR="${{ github.event.pull_request.number }}"
153+
else
154+
REPORT_DIR="main"
155+
fi
156+
rm -rf gh-pages/$REPORT_DIR
157+
mkdir -p gh-pages/$REPORT_DIR
158+
cp -r playwright-artifacts/playwright-report/* gh-pages/$REPORT_DIR/
159+
160+
- name: Deploy report to GitHub Pages
161+
uses: peaceiris/actions-gh-pages@v3
162+
with:
163+
github_token: ${{ secrets.GITHUB_TOKEN }}
164+
publish_dir: gh-pages
165+
destination_dir: .
166+
force_orphan: true
167+
123168
bundle_size:
124169
name: Check Bundle Size
125170
runs-on: ubuntu-latest
@@ -183,51 +228,6 @@ jobs:
183228
echo "diff=$diff" >> $GITHUB_OUTPUT
184229
echo "percent=$percent" >> $GITHUB_OUTPUT
185230
186-
deploy_report:
187-
name: Deploy Test Report
188-
needs: [e2e_tests]
189-
if: ${{always() && (github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository))}}
190-
runs-on: ubuntu-latest
191-
permissions:
192-
contents: write
193-
pages: write
194-
195-
steps:
196-
- uses: actions/checkout@v4
197-
with:
198-
fetch-depth: 0
199-
200-
- name: Fetch gh-pages branch
201-
run: |
202-
git fetch origin gh-pages:gh-pages
203-
mkdir gh-pages
204-
git --work-tree=gh-pages checkout gh-pages -- .
205-
206-
- name: Download Playwright artifacts
207-
uses: actions/download-artifact@v3
208-
with:
209-
name: playwright-artifacts
210-
path: playwright-artifacts
211-
212-
- name: Copy new report
213-
run: |
214-
if [ "${{ github.event_name }}" = "pull_request" ]; then
215-
REPORT_DIR="${{ github.event.pull_request.number }}"
216-
else
217-
REPORT_DIR="main"
218-
fi
219-
rm -rf gh-pages/$REPORT_DIR
220-
mkdir -p gh-pages/$REPORT_DIR
221-
cp -r playwright-artifacts/playwright-report/* gh-pages/$REPORT_DIR/
222-
223-
- name: Deploy report to GitHub Pages
224-
uses: peaceiris/actions-gh-pages@v3
225-
with:
226-
github_token: ${{ secrets.GITHUB_TOKEN }}
227-
publish_dir: gh-pages
228-
destination_dir: .
229-
force_orphan: true
230-
231231
update_pr:
232232
name: Update PR Description
233233
needs: [e2e_tests, bundle_size]

0 commit comments

Comments
 (0)