@@ -12,14 +12,21 @@ jobs:
1212 build :
1313 name : " Build"
1414
15- runs-on : " ubuntu-20 .04"
15+ runs-on : " ubuntu-24 .04"
1616
1717 strategy :
1818 matrix :
1919 language :
2020 - " ja"
2121
2222 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+
2330 - name : " Checkout php/doc-${{ matrix.language }}"
2431 uses : " actions/checkout@v4"
2532 with :
3946 path : " doc-base"
4047 repository : " php/doc-base"
4148
49+ - name : " Checkout php/phd"
50+ uses : " actions/checkout@v4"
51+ with :
52+ path : " phd"
53+ repository : " php/phd"
54+
4255 - 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