File tree Expand file tree Collapse file tree 2 files changed +65
-1
lines changed Expand file tree Collapse file tree 2 files changed +65
-1
lines changed Original file line number Diff line number Diff line change
1
+ # https://docs.github.com/en/actions
2
+
3
+ name : " Integrate"
4
+
5
+ on :
6
+ pull_request : null
7
+ push :
8
+ branches :
9
+ - " master"
10
+
11
+ jobs :
12
+ build :
13
+ name : " Build"
14
+
15
+ runs-on : " ubuntu-latest"
16
+
17
+ continue-on-error : true
18
+
19
+ strategy :
20
+ matrix :
21
+ language :
22
+ - " de"
23
+ - " en"
24
+ - " es"
25
+ - " fr"
26
+ - " it"
27
+ - " ja"
28
+ - " pl"
29
+ - " pt_br"
30
+ - " ro"
31
+ - " ru"
32
+ - " tr"
33
+ - " uk"
34
+ - " zh"
35
+
36
+ steps :
37
+ - name : " Checkout"
38
+ uses : " actions/checkout@v2"
39
+ with :
40
+ path : " doc-base"
41
+
42
+ - name : " Checkout php/doc-${{ matrix.language }}"
43
+ uses : " actions/checkout@v2"
44
+ with :
45
+ path : " ${{ matrix.language }}"
46
+ repository : " php/doc-${{ matrix.language }}"
47
+
48
+ - name : " Checkout php/doc-en as fallback"
49
+ if : " matrix.language != 'en'"
50
+ uses : " actions/checkout@v2"
51
+ with :
52
+ path : " en"
53
+ repository : " php/doc-en"
54
+
55
+ - name : " Build documentation for ${{ matrix.language }}"
56
+ run : " php8.0 doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=${{ matrix.language }}"
Original file line number Diff line number Diff line change @@ -234,7 +234,15 @@ function print_xml_errors($details = true) {
234
234
$ workdir = $ srcdir ;
235
235
$ basedir = $ srcdir ;
236
236
$ rootdir = dirname ($ basedir );
237
- if (basename ($ rootdir ) == 'doc-base ' ) {
237
+
238
+ /**
239
+ * When checking out this repository on GitHub Actions, the workspace directory is "/home/runner/work/doc-base/doc-base".
240
+ *
241
+ * To avoid applying dirname() here, we check if we are running on GitHub Actions.
242
+ *
243
+ * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables
244
+ */
245
+ if (getenv ('GITHUB_ACTIONS ' ) !== 'true ' && basename ($ rootdir ) === 'doc-base ' ) {
238
246
$ rootdir = dirname ($ rootdir );
239
247
}
240
248
You can’t perform that action at this time.
0 commit comments