-
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.02 KB
/
Copy pathbuild.yml
File metadata and controls
46 lines (39 loc) · 1.02 KB
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
name: Build docs
on:
push:
branches: [main]
paths:
- README.md
- 'plugins/**'
- build-docs.php
- custom.css
- composer.json
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer:v2
coverage: none
- name: Install dependencies
run: composer install --no-interaction --prefer-dist --no-progress
- name: Generate docs
run: composer docs:build
- name: Commit generated docs
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "chore: regenerate docs [skip ci]"
git push
fi