Skip to content

Commit 54cf3f5

Browse files
committed
workflow docs
1 parent 51581ff commit 54cf3f5

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Docs
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
docs:
11+
name: Docs
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Check out repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: '8.3'
22+
23+
- name: Download phpDocumentor
24+
run: |
25+
mkdir -p tools
26+
wget https://phpdoc.org/phpDocumentor.phar -O tools/phpdocumentor
27+
28+
- name: Generate Documentation
29+
run: php tools/phpdocumentor run --config=phpdoc.xml
30+
31+
- name: Create CNAME file
32+
run: echo "api-client-php.docs.libredte.cl" > build/docs/CNAME
33+
34+
- name: Deploy to GitHub Pages
35+
if: success()
36+
uses: peaceiris/actions-gh-pages@v4
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: ./build/docs
40+
publish_branch: gh-pages

0 commit comments

Comments
 (0)