-
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (71 loc) · 2.18 KB
/
wiki.yml
File metadata and controls
82 lines (71 loc) · 2.18 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Update Wiki
on:
workflow_call:
workflow_dispatch:
push:
branches: ["main"]
permissions:
contents: write
concurrency:
group: update-wiki-${{ github.ref }}
cancel-in-progress: true
jobs:
wiki:
name: Update Wiki
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ github.token }}
submodules: recursive
fetch-depth: 0
- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
uses: php-actions/composer@v6
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ github.token }}"} }'
COMPOSER_CACHE_DIR: /tmp/composer-cache
with:
php_version: '8.3'
command: 'install'
args: '--prefer-dist --no-progress --no-interaction --no-scripts'
- name: Prepare wiki submodule branch
working-directory: .github/wiki
run: |
git fetch origin master
git switch -C master --track origin/master || git switch master
git reset --hard origin/master
git clean -fd
- name: Create Docs Markdown
uses: php-actions/composer@v6
with:
php_version: '8.3'
command: 'dev-tools'
args: 'wiki -- --target=.github/wiki'
- name: Commit & push wiki submodule
id: wiki_commit
uses: EndBug/add-and-commit@v10
with:
cwd: .github/wiki
add: .
message: "Update wiki docs"
default_author: github_actions
pull: "--rebase --autostash"
push: true
- name: Commit parent repo submodule pointer
if: steps.wiki_commit.outputs.committed == 'true'
id: parent_commit
uses: EndBug/add-and-commit@v10
with:
add: .github/wiki
message: "Update wiki submodule pointer"
default_author: github_actions
pull: "--rebase --autostash"
push: true