-
Notifications
You must be signed in to change notification settings - Fork 60
47 lines (45 loc) · 1.48 KB
/
documentation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: phpDocumentor
on:
push:
branches:
- 'master'
tags:
- 'v*'
jobs:
documentation:
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
- name: Setup PHP 8.3
if: ${{ github.ref != 'refs/heads/master' }}
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
- 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'
run: curl -O -L https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.4.3/phpDocumentor.phar
- 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 }}