-
Notifications
You must be signed in to change notification settings - Fork 328
55 lines (48 loc) · 1.31 KB
/
update-docs.yaml
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
name: "Update docs"
on:
push:
branches:
- master
paths:
- 'README.md'
- 'charts/**/README.md'
- 'charts/**/README.md.gotmpl'
- '**/README.md'
- '**/README.md.gotmpl'
- '.github/workflows/update-docs.yaml'
jobs:
publish-readme:
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Generate docs
run:
make gen-docs
- name: Copy docs
run: |
cp -f README.md ${{ runner.temp }}/README.md
for readme in $(find charts/*/README.md)
do
mkdir -p $(dirname ${{ runner.temp }}/$readme)
cp -f $readme ${{ runner.temp }}/$readme
done
- name: Checkout to pages
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Synchronize docs
run: |
cp -f ${{ runner.temp }}/README.md .
cp -fr ${{ runner.temp }}/charts ./
git add README.md
git add charts/*/README.md
git commit --signoff -m "Synchronize docs"
git push