@@ -12,14 +12,21 @@ jobs:
12
12
build :
13
13
name : " Build"
14
14
15
- runs-on : " ubuntu-20 .04"
15
+ runs-on : " ubuntu-24 .04"
16
16
17
17
strategy :
18
18
matrix :
19
19
language :
20
20
- " ja"
21
21
22
22
steps :
23
+ - name : " Set up PHP"
24
+ uses : " shivammathur/setup-php@v2"
25
+ with :
26
+ php-version : " 8.3"
27
+ extensions : " sqlite3"
28
+ coverage : " none"
29
+
23
30
- name : " Checkout php/doc-${{ matrix.language }}"
24
31
uses : " actions/checkout@v4"
25
32
with :
39
46
path : " doc-base"
40
47
repository : " php/doc-base"
41
48
49
+ - name : " Checkout php/phd"
50
+ uses : " actions/checkout@v4"
51
+ with :
52
+ path : " phd"
53
+ repository : " php/phd"
54
+
42
55
- name : " Build documentation for ${{ matrix.language }}"
43
- run : " php8.0 doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=${{ matrix.language }}"
56
+ run : " php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=${{ matrix.language }}"
57
+
58
+ - name : " Render documentation for ${{ matrix.language }}"
59
+ run : " php phd/render.php --docbook doc-base/.manual.xml --package PHP --format xhtml"
60
+
61
+ - name : " Save documentation for ${{ matrix.language }}"
62
+ uses : " actions/upload-artifact@v4"
63
+ with :
64
+ name : " doc-ja-html-${{ github.event.pull_request.number || github.ref_name }}"
65
+ path : " output/php-chunked-xhtml"
66
+ retention-days : 7
67
+ overwrite : true # 同じPR/ブランチの成果物は1つだけ残す
68
+
69
+ textlint :
70
+ name : " Textlint"
71
+
72
+ needs : ["build"]
73
+ runs-on : " ubuntu-24.04"
74
+
75
+ steps :
76
+ - name : " Checkout"
77
+ uses : " actions/checkout@v4"
78
+
79
+ - name : " Install Node.js"
80
+ uses : " actions/setup-node@v4"
81
+ with :
82
+ node-version : " 22"
83
+ cache : " npm"
84
+ cache-dependency-path : " build/package-lock.json"
85
+
86
+ - name : " Download artifacts"
87
+ uses : " actions/download-artifact@v4"
88
+ with :
89
+ name : " doc-ja-html-${{ github.event.pull_request.number || github.ref_name }}"
90
+ path : " build/output"
91
+
92
+ - name : " Install textlint"
93
+ run : " npm ci --no-audit"
94
+ working-directory : " build"
95
+
96
+ - name : " Run textlint"
97
+ run : " npx textlint --color ./output"
98
+ working-directory : " build"
0 commit comments