-
Notifications
You must be signed in to change notification settings - Fork 12
35 lines (35 loc) · 1.13 KB
/
plugin_docs_test.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
name: Test plugin docs
on:
workflow_call:
pull_request:
paths:
- 'docs/**/*'
jobs:
build_docs:
if: github.repository != 'logstash-plugins/.ci'
runs-on: ubuntu-latest
steps:
- name: Check out plugin code
uses: actions/checkout@v4
with:
path: plugin
- name: Checkout docs repo
uses: actions/checkout@v4
with:
repository: elastic/docs
path: docs
- name: Checkout logstash repo
uses: actions/checkout@v4
with:
repository: elastic/logstash
path: logstash
- name: Checkout logstash-docs repo
uses: actions/checkout@v4
with:
repository: elastic/logstash-docs
path: logstash-docs
- name: copy plugin doc entry to logstash-docs
run: |
cp plugin/docs/index.asciidoc "logstash-docs/docs/plugins/$(awk -F': ' '/:type:/{t=$2}/:plugin:/{p=$2} END{print t "s/" p}' plugin/docs/index.asciidoc).asciidoc"
- name: Build docs
run: ./docs/build_docs --respect_edit_url_overrides --doc logstash/docs/index.asciidoc --resource=logstash-docs/docs/ --chunk 1