1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change 16
16
name : " Build API References Pages"
17
17
runs-on : " ubuntu-latest"
18
18
19
+ strategy :
20
+ matrix :
21
+ branch :
22
+ - " 1.23.x"
23
+ - " 2.0.x"
24
+
19
25
steps :
20
26
- name : " Checkout"
21
27
uses : actions/checkout@v4
28
+ with :
29
+ ref : ${{ matrix.branch }}
22
30
23
31
- name : " Install PHP"
24
32
uses : " shivammathur/setup-php@v2"
@@ -36,18 +44,36 @@ jobs:
36
44
run : " composer install --no-interaction --no-progress"
37
45
38
46
- name : " Run ApiGen"
39
- run : " apigen/vendor/bin/apigen -c apigen/apigen.neon --output docs/${{ github.ref_name }} -- src"
47
+ run : " apigen/vendor/bin/apigen -c apigen/apigen.neon --output docs/${{ matrix.branch }} -- src"
40
48
41
49
- name : " Copy favicon"
42
50
run : " cp apigen/favicon.png docs/favicon.png"
43
51
52
+ - uses : actions/upload-artifact@v4
53
+ with :
54
+ name : docs-${{ matrix.branch }}
55
+ path : docs/*
56
+
57
+ merge :
58
+ name : " Merge docs"
59
+ needs : build
60
+
61
+ runs-on : " ubuntu-latest"
62
+
63
+ steps :
64
+ - uses : actions/download-artifact@v4
65
+ with :
66
+ pattern : docs-*
67
+ path : docs
68
+ merge-multiple : true
69
+
44
70
- name : Upload artifact
45
71
uses : actions/upload-pages-artifact@v3
46
72
with :
47
73
path : ' docs'
48
74
49
75
deploy :
50
- needs : build
76
+ needs : merge
51
77
52
78
# from https://github.com/actions/deploy-pages
53
79
0 commit comments