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 c5b4a79

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

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

‎.github/workflows/apiref.yml

Lines changed: 27 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,35 @@ 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+
4469
- name: Upload artifact
4570
uses: actions/upload-pages-artifact@v3
4671
with:
4772
path: 'docs'
4873

4974
deploy:
50-
needs: build
75+
needs: merge
5176

5277
# from https://github.com/actions/deploy-pages
5378

0 commit comments

Comments
(0)

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