Skip to content

pages

pages #4

Workflow file for this run

name: pages
on:
workflow_run:
workflows: [ "ci" ]
types: [ completed ]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: gradle
- run: ./gradlew --no-daemon test jacocoTestReport
- name: Prepare site
run: |
mkdir -p site
cp -r build/reports/tests/test site/tests
cp -r build/reports/jacoco/html site/coverage
cat > site/index.html << 'EOF'
<!DOCTYPE html>
<html>
<head>
<title>Sprout Test Reports</title>
<style>
body { font-family: Arial, sans-serif; margin: 40px; }
.container { max-width: 800px; margin: 0 auto; }
.card { border: 1px solid #ddd; border-radius: 8px; padding: 20px; margin: 20px 0; }
.card h2 { margin-top: 0; color: #333; }
.card p { color: #666; }
.card a { display: inline-block; background: #007cba; color: white; padding: 10px 20px; text-decoration: none; border-radius: 4px; margin-top: 10px; }
.card a:hover { background: #005a87; }
</style>
</head>
<body>
<div class="container">
<h1>🌱 Sprout Framework - Test Reports</h1>
<div class="card">
<h2>📊 Test Coverage Report</h2>
<p>JaCoCo 테스트 커버리지 리포트를 확인할 수 있습니다.</p>
<a href="coverage/index.html">Coverage Report 보기</a>
</div>
<div class="card">
<h2>🧪 Test Results</h2>
<p>단위 테스트 실행 결과와 상세 정보를 확인할 수 있습니다.</p>
<a href="tests/index.html">Test Results 보기</a>
</div>
</div>
</body>
</html>
EOF
- uses: actions/upload-pages-artifact@v3
with:
path: site
- uses: actions/deploy-pages@v4