-
Notifications
You must be signed in to change notification settings - Fork 147
75 lines (68 loc) · 2.29 KB
/
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Update docs
on:
push:
branches:
- 'master'
paths:
- 'docs/**'
jobs:
update-docs:
runs-on: ubuntu-latest
environment:
name: docs
url: https://docs.victoriametrics.com/
steps:
- name: Check out operator code
uses: actions/checkout@v4
with:
repository: VictoriaMetrics/operator
ref: master
token: ${{ secrets.VM_BOT_GH_TOKEN }}
path: __vm-operator-repo
- name: Check out VM code
uses: actions/checkout@v4
with:
repository: VictoriaMetrics/VictoriaMetrics
ref: master
token: ${{ secrets.VM_BOT_GH_TOKEN }}
path: __vm-docs-repo
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.23
id: go
- name: Import GPG key
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.VM_BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.VM_BOT_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
workdir: __vm-docs-repo
- name: Update operator docs in VM repo
id: update
run: |
make docs
# Sync markdown files and pictures
rsync -zarv \
--include="*/" \
--include="*.webp" \
--include="*.md" \
--exclude="*" \
docs/ ../__vm-docs-repo/docs/operator/
echo "BUILDTIME=$(date +%s)" >> $GITHUB_OUTPUT
echo "SHORT_SHA=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_OUTPUT
working-directory: __vm-operator-repo
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
add-paths: docs/operator
commit-message: Automatic update operator docs from ${{ github.repository }}@${{ steps.update.outputs.SHORT_SHA }}
signoff: true
committer: "Github Actions <${{ steps.import-gpg.outputs.email }}>"
path: __vm-docs-repo
branch: operator-docs-update-${{ steps.update.outputs.BUILDTIME }}
token: ${{ secrets.VM_BOT_GH_TOKEN }}
delete-branch: true
title: Automatic update operator docs from ${{ github.repository }}@${{ steps.update.outputs.SHORT_SHA }}