-
Notifications
You must be signed in to change notification settings - Fork 110
69 lines (58 loc) · 2.04 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
name: "Documentation"
on:
pull_request_target:
branches:
- "[0-9]+.[0-9]+"
- "[0-9]+.x"
paths:
- 'doc/**'
- '.github/workflows/docs.yaml'
- 'README.md'
push:
branches:
- "[0-9]+.[0-9]+"
- "[0-9]+.x"
- "*_actions"
paths:
- 'doc/**'
- 'README.md'
permissions:
contents: read
jobs:
docs:
name: "Generate docs Pimcore Docs Generator"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout code"
uses: "actions/checkout@v3"
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: "Checkout Docs Generator"
uses: "actions/checkout@v3"
with:
repository: "pimcore/docs-generator"
ref: "main"
path: "./docs-generator"
token: ${{ secrets.DOCS_GENERATOR_ACCESS_TOKEN }}
- name: "Install Node"
uses: actions/setup-node@v3
with:
node-version: 19.x
registry-url: 'https://registry.npmjs.org'
- name: Prepare Docs
working-directory: "./docs-generator"
run: |
mkdir docs
# copy docs to working directory
cp -r ../doc ./docs/
# copy readme to working directory
cp -r ../README.md ./docs/
# copy index page
cp bin/resources/00_index_empty.md ./docs/00_index.md
# use special docusaurus config (to exclude search plugin) and check for broken links
mv docusaurus.config.js.repos-tests docusaurus.config.js
- name: Build Docs
working-directory: "./docs-generator"
run: |
npm install
npm run build