Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4c9c7ab

Browse files
Deploy all branches of API Reference at once
1 parent 3b33ee0 commit 4c9c7ab

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

‎.github/workflows/apiref.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@ jobs:
1616
name: "Build API References Pages"
1717
runs-on: "ubuntu-latest"
1818

19+
strategy:
20+
matrix:
21+
branch:
22+
- "1.23.x"
23+
- "2.0.x"
24+
1925
steps:
2026
- name: "Checkout"
2127
uses: actions/checkout@v4
28+
with:
29+
ref: ${{ matrix.branch }}
2230

2331
- name: "Install PHP"
2432
uses: "shivammathur/setup-php@v2"
@@ -36,18 +44,36 @@ jobs:
3644
run: "composer install --no-interaction --no-progress"
3745

3846
- 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"
4048

4149
- name: "Copy favicon"
4250
run: "cp apigen/favicon.png docs/favicon.png"
4351

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+
4470
- name: Upload artifact
4571
uses: actions/upload-pages-artifact@v3
4672
with:
4773
path: 'docs'
4874

4975
deploy:
50-
needs: build
76+
needs: merge
5177

5278
# from https://github.com/actions/deploy-pages
5379

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /