-
-
Notifications
You must be signed in to change notification settings - Fork 9
41 lines (38 loc) · 1.08 KB
/
generate-docs.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
# This workflows will re-generate the PHP docs when there are changes on main
name: Generate Documentation
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Install dependencies
run: |
composer install --prefer-dist --no-progress
wget https://phpdoc.org/phpDocumentor.phar
chmod +x phpDocumentor.phar
- name: Run generate-docs
run: |
rm -rf docs/html
make generate-docs
- name: Commit files
run: |
echo ${{ github.ref }}
git add docs
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "📝 CI: automated Generate Documentation" -a | exit 0
- name: Push changes
if: github.ref == 'refs/heads/main'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main