Skip to content

Commit 090dd3a

Browse files
committed
Add separate docs-sync.yml
1 parent 7cda83f commit 090dd3a

File tree

2 files changed

+45
-40
lines changed

2 files changed

+45
-40
lines changed

.github/workflows/docs-sync.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: doc-sync
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
fix:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: '8.2'
20+
21+
- name: Get Composer Cache Directory
22+
id: composer-cache
23+
run: |
24+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
25+
26+
- uses: actions/cache@v4
27+
with:
28+
path: ${{ steps.composer-cache.outputs.dir }}
29+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-composer-
32+
33+
- name: Install dependencies
34+
if: steps.composer-cache.outputs.cache-hit != 'true'
35+
run: composer install --prefer-dist --no-progress
36+
37+
- name: Run docgen
38+
run: php bin/docgen
39+
40+
- name: Add & Commit
41+
uses: EndBug/add-and-commit@v9
42+
with:
43+
default_author: github_actions
44+
add: 'docs'
45+
message: '[automatic] Update docs with bin/docgen'

.github/workflows/docs.yml

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
pull_request:
77
branches: [ master ]
88

9-
permissions:
10-
contents: write
11-
129
jobs:
1310
docgen:
1411
runs-on: ubuntu-latest
@@ -47,40 +44,3 @@ jobs:
4744
echo $status;
4845
exit 1;
4946
}
50-
51-
fix:
52-
if: github.ref == 'refs/heads/master'
53-
runs-on: ubuntu-latest
54-
steps:
55-
- uses: actions/checkout@v4
56-
57-
- name: Setup PHP
58-
uses: shivammathur/setup-php@v2
59-
with:
60-
php-version: '8.2'
61-
62-
- name: Get Composer Cache Directory
63-
id: composer-cache
64-
run: |
65-
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
66-
67-
- uses: actions/cache@v4
68-
with:
69-
path: ${{ steps.composer-cache.outputs.dir }}
70-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
71-
restore-keys: |
72-
${{ runner.os }}-composer-
73-
74-
- name: Install dependencies
75-
if: steps.composer-cache.outputs.cache-hit != 'true'
76-
run: composer install --prefer-dist --no-progress
77-
78-
- name: Run docgen
79-
run: php bin/docgen
80-
81-
- name: Add & Commit
82-
uses: EndBug/add-and-commit@v9
83-
with:
84-
default_author: github_actions
85-
add: 'docs'
86-
message: '[automatic] Update docs with bin/docgen'

0 commit comments

Comments
 (0)