Skip to content

Commit e3a492f

Browse files
author
nix
committed
fix QA action (5): own deploy step
1 parent 342bebf commit e3a492f

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

.github/workflows/quality-assurance.yml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ jobs:
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

Comments
 (0)