|
1 | | -# generate-phpdocs-with-evert-phpdoc-md-action |
2 | | -GitHub action to generate PHP project documentation with evert/phpdoc-md library |
| 1 | +[](LICENSE) |
| 2 | +[](https://github.com/impresscms-dev/generate-php-project-classes-list-file-action/releases) |
| 3 | + |
| 4 | +# Generate PHP docs with evert/phpdoc-md |
| 5 | + |
| 6 | +GitHub action to generate PHP project documentation in [MarkDown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) format. Based on [clean/phpdoc-md](https://github.com/clean/phpdoc-md) library. |
| 7 | + |
| 8 | +## Usage |
| 9 | + |
| 10 | +To use this action in your project, create workflow in your project similar to this code (Note: some parts and arguments needs to be altered): |
| 11 | +```yaml |
| 12 | +name: Generate documentation |
| 13 | + |
| 14 | +on: |
| 15 | + push: |
| 16 | + |
| 17 | +jobs: |
| 18 | + get_php_classes_list: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - name: Checkouting project code... |
| 22 | + uses: actions/checkout@v2 |
| 23 | + |
| 24 | + - name: Install PHP |
| 25 | + uses: shivammathur/setup-php@master |
| 26 | + with: |
| 27 | + php-version: 8.1 |
| 28 | + extensions: curl, gd, pdo_mysql, json, mbstring, pcre, session |
| 29 | + ini-values: post_max_size=256M |
| 30 | + coverage: none |
| 31 | + tools: composer:v2 |
| 32 | + |
| 33 | + - name: Install Composer dependencies (with dev) |
| 34 | + run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader |
| 35 | + |
| 36 | + - name: Generating documentation... |
| 37 | + uses: impresscms-dev/[email protected] |
| 38 | + with: |
| 39 | + output_path: ./docs/ |
| 40 | + ignored_files: | |
| 41 | + test/ |
| 42 | + extras/ |
| 43 | + |
| 44 | + - uses: actions/upload-artifact@v3 |
| 45 | + with: |
| 46 | + name: my-artifact |
| 47 | + path: ./docs/ |
| 48 | +``` |
| 49 | +
|
| 50 | +## Arguments |
| 51 | +
|
| 52 | +This action supports such arguments (used in `with` keyword): |
| 53 | +| Argument | Required | Default value | Description | |
| 54 | +|-------------|----------|----------------------|-----------------------------------| |
| 55 | +| ignored_files | No | | Defines files that can be ignored (supports glob rules; each line means one rule) | |
| 56 | +| phpdocumentor_version | No | latest | What [PHP Documentator](https://www.phpdoc.org) version to use? (version = docker image tag) | |
| 57 | +| output_path | Yes | | Path where to write generated documentation | |
| 58 | + |
| 59 | +## How to contribute? |
| 60 | + |
| 61 | +If you want to add some functionality or fix bugs, you can fork, change and create pull request. If you not sure how this works, try [interactive GitHub tutorial](https://try.github.io). |
| 62 | + |
| 63 | +If you found any bug or have some questions, use [issues tab](https://github.com/impresscms-dev/generate-phpdocs-with-evert-phpdoc-md-action/issues) and write there your questions. |
0 commit comments