Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/build-reusable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Reusable GitHub Action to build the documentation for a given repository.

name: "Build"

on:
workflow_call:
inputs:
language:
required: true
type: string
description: "Language code (e.g. de, it, es, etc) indicating the language of the documentation."
repo:
required: false
type: string
default: ${{ github.repository }}
description: "Repo path (e.g. php/doc-de) to build the documentation from."
repo_ref:
required: false
type: string
default: ${{ github.ref }}
description: "Repository checkout ref, defaults ref that triggered the action (github.ref)."
doc_base:
required: false
type: string
default: 'php/doc-base'
description: "Repo path to the doc-base repository, defaults to php/doc-base."
doc_en:
required: false
type: string
default: 'php/doc-en'
description: "Repo path to the doc-en repository, defaults to php/doc-en."

jobs:
build:
name: "Build - ${{ inputs.language }} - ${{ inputs.repo }}"
runs-on: ubuntu-latest
steps:
- name: "Checkout doc-base"
uses: "actions/checkout@v4"
with:
path: "doc-base"
repository: ${{ inputs.doc_base }}

- name: "Checkout ${{ inputs.language }} from ${{ inputs.repo }}"
uses: "actions/checkout@v4"
with:
path: ${{ inputs.language }}
repository: ${{ inputs.repo }}
ref: ${{ inputs.repo_ref }}

- name: "Checkout ${{ inputs.doc_en }} as fallback"
if: "${{ inputs.language }} != 'en'"
uses: "actions/checkout@v4"
with:
path: "en"
repository: ${{ inputs.doc_en }}

- name: "Run QA scripts for EN docs"
if: "${{ inputs.language }} == 'en'"
run: |
php doc-base/scripts/qa/extensions.xml.php --check
php doc-base/scripts/qa/section-order.php

- name: "Build documentation for ${{ inputs.language }}"
run: "php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=${{ inputs.language }}"
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# https://docs.github.com/en/actions

name: "Integrate"

on:
pull_request: null
push:

jobs:
build:
name: "Build: ${{ matrix.language }}"
strategy:
matrix:
language:
- "de"
- "en"
- "es"
- "fr"
- "it"
- "ja"
- "pl"
- "pt_br"
# - "ro"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# - "ro"
# - "ro"

LGTM.

- "ru"
- "tr"
- "uk"
- "zh"

uses: "./.github/workflows/build-reusable.yml"
with:
repo: 'php/doc-${{ matrix.language }}'
repo_ref: ''
language: ${{ matrix.language }}
62 changes: 0 additions & 62 deletions .github/workflows/integrate.yaml

This file was deleted.