2021-06-02 17:00:32 +03:00
|
|
|
name: phpDocumentor
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
|
|
|
|
jobs:
|
2023-11-27 15:32:27 +03:00
|
|
|
documentation:
|
2021-06-02 17:00:32 +03:00
|
|
|
name: "phpDocumentor"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check GitHub Pages status
|
|
|
|
if: ${{ github.ref != 'refs/heads/master' }}
|
|
|
|
uses: crazy-max/ghaction-github-status@v2
|
|
|
|
with:
|
|
|
|
pages_threshold: major_outage
|
|
|
|
- name: Check out code into the workspace
|
|
|
|
if: success() && ${{ github.ref != 'refs/heads/master' }}
|
|
|
|
uses: actions/checkout@v2
|
2023-11-27 15:32:27 +03:00
|
|
|
- name: Setup PHP 8.3
|
2021-06-02 17:00:32 +03:00
|
|
|
if: ${{ github.ref != 'refs/heads/master' }}
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
2023-11-27 15:32:27 +03:00
|
|
|
php-version: "8.3"
|
2021-06-02 17:00:32 +03:00
|
|
|
- name: Cache phpDocumentor
|
|
|
|
id: cache-phpdocumentor
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: phpDocumentor.phar
|
|
|
|
key: phpdocumentor
|
|
|
|
- name: Download latest phpDocumentor
|
|
|
|
if: steps.cache-phpdocumentor.outputs.cache-hit != 'true'
|
2023-11-27 15:32:27 +03:00
|
|
|
run: curl -O -L https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.4.3/phpDocumentor.phar
|
2021-06-02 17:00:32 +03:00
|
|
|
- name: Generate documentation
|
|
|
|
if: ${{ github.ref != 'refs/heads/master' }}
|
|
|
|
run: php phpDocumentor.phar
|
|
|
|
- name: Deploy documentation to GitHub Pages
|
|
|
|
if: ${{ github.ref != 'refs/heads/master' }}
|
|
|
|
uses: crazy-max/ghaction-github-pages@v2
|
|
|
|
with:
|
|
|
|
target_branch: gh-pages
|
|
|
|
build_dir: docs/build/html
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|