-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from greg0ire/documentation
Implement documentation action
- Loading branch information
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
name: "Documentation" | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
guides: | ||
name: "phpDocumentor Guides" | ||
runs-on: "ubuntu-22.04" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "8.3" # Use the same version as in doctrine/doctrine-website | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v4" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php-version }}" | ||
tools: "cs2pr" | ||
|
||
# Some of our dependencies have supported branches where they still need | ||
# to support PHP < 8.1. For that reason, let us not even attempt to install | ||
# the usual dependencies and start from scratch. | ||
- name: "Remove existing composer file" | ||
run: "rm composer.json" | ||
|
||
- name: "Require phpdocumentor/guides-cli" | ||
# We use the same version constraint as in doctrine/doctrine-website | ||
run: "composer require --dev phpdocumentor/guides-cli '^1.4' --no-update" | ||
|
||
- name: "Install dependencies with Composer" | ||
uses: "ramsey/composer-install@v3" | ||
with: | ||
dependency-versions: "highest" | ||
composer-options: "${{ inputs.composer-options }}" | ||
|
||
- name: "Run guides" | ||
run: | | ||
vendor/bin/guides -vvv --no-progress --fail-on-log docs/en |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "Documentation", | ||
"description": "Validates the documentation", | ||
"iconName": "doctrine-logo", | ||
"categories": [ | ||
"RST" | ||
], | ||
"filePatterns": [ | ||
"^guides\\.xml$" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
name: "Documentation" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "*.x" | ||
paths: | ||
- ".github/workflows/documentation.yml" | ||
- "docs/**" | ||
push: | ||
branches: | ||
- "*.x" | ||
paths: | ||
- ".github/workflows/documentation.yml" | ||
- "docs/**" | ||
|
||
jobs: | ||
documentation: | ||
name: "Documentation" | ||
uses: "doctrine/.github/.github/workflows/documentation.yml@use_a_valid_ref_here" |