1616 strategy :
1717 matrix :
1818 php : [ '8.2', '8.3', '8.4', '8.5' ]
19- environment :
20- name : github-pages
21- url : ' ${{ steps.deployment.outputs.page_url }}/coverage/php-${{ matrix.php }}'
2219 steps :
2320 - name : ' Checkout'
2421 uses : actions/checkout@v4
@@ -35,12 +32,39 @@ jobs:
3532 uses : actions/upload-pages-artifact@v3
3633 with :
3734 path : ' tests-output/coverage'
38- name : coverage-${{ matrix.php }}
39- - name : ' Deploy to GitHub pages (PHP ${{ matrix.php }})'
35+ name : coverage-php-${{ matrix.php }}
36+ deploy-pages :
37+ name : Deploy coverage reports to Pages
38+ runs-on : ubuntu-latest
39+ needs : unit-tests
40+ environment :
41+ name : github-pages
42+ url : ' ${{ steps.deployment.outputs.page_url }}coverage/php-8.5/html/'
43+ steps :
44+ - name : ' Checkout (for repo metadata)'
45+ uses : actions/checkout@v4
46+ - name : ' Download artifacts'
47+ uses : actions/download-artifact@v4
48+ with :
49+ path : artifacts
50+ - name : ' Arrange artifacts into subdirectories'
51+ run : |
52+ set -e
53+ mkdir -p site/coverage
54+ for af in artifacts/coverage-* ; do
55+ a=$(basename "$af")
56+ mv "$af" "site/coverage/${a#coverage-}"
57+ done
58+ - name : ' Upload site artifact'
59+ uses : actions/upload-pages-artifact@v3
60+ with :
61+ path : site
62+ name : site
63+ - name : ' Deploy to Pages'
4064 id : deployment
4165 uses : actions/deploy-pages@v4
4266 with :
43- artifact_name : coverage-${{ matrix.php }}
67+ artifact_name : site
4468 static-analysis :
4569 name : PHPStan checks (PHP ${{ matrix.php }})
4670 runs-on : ubuntu-latest
0 commit comments