From b4581f6fc8324f337e567e97ae72ecde20c9c354 Mon Sep 17 00:00:00 2001 From: urjimyu <92876819+urjimyu@users.noreply.github.com> Date: Mon, 12 Aug 2024 21:46:31 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=84=B1=EB=8A=A5=20=EC=A0=90=EC=88=98?= =?UTF-8?q?=EC=99=80=20=EB=B3=80=EA=B2=BD=EB=90=9C=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=ED=99=95=EC=9D=B8=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yml | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 4772046..96ec66f 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -54,9 +54,38 @@ jobs: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > vercel-output.txt echo "preview_url=$(cat vercel-output.txt)" >> $GITHUB_OUTPUT - # PR 프리뷰 배포 - - name: Comment PR with Preview URL + # 성능 메트릭 + - name: Run Lighthouse + id: lighthouse + uses: treosh/lighthouse-ci-action@v9 + with: + urls: | + ${{ steps.deploy.outputs.preview_url }} + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v44 + + - name: List all changed files + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + run: | + for file in ${ALL_CHANGED_FILES}; do + echo "$file was changed" + done + + # PR 프리뷰 배포 링크 및 성능 점수 보여주기 + - name: Comment PR with Preview URL and Lighthouse scores uses: thollander/actions-comment-pull-request@v2 with: message: | - 🎉 구현한 기능 Preview: ${{ steps.deploy.outputs.preview_url }} \ No newline at end of file + 🎉 구현한 기능 Preview: ${{ steps.deploy.outputs.preview_url }} + + 변경된 파일 목록: + ${{ steps.changed-files.outputs.all_changed_files }} + + Lighthouse 점수: + - Performance: ${{ steps.lighthouse.outputs.performance }} + - Accessibility: ${{ steps.lighthouse.outputs.accessibility }} + - Best Practices: ${{ steps.lighthouse.outputs.best-practices }} + - SEO: ${{ steps.lighthouse.outputs.seo }}