Skip to content

Commit b610c46

Browse files
authored
Merge pull request #590 from pimcore/docs_actions
Use reusable documentation workflow
1 parent 2a65588 commit b610c46

File tree

5 files changed

+128
-71
lines changed

5 files changed

+128
-71
lines changed

.github/workflows/docs.yaml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/workflows/docs.yaml.bak

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Original docs workflow disabled in favor of new-docs.yml
2+
# This file is kept only for reference. The active workflow is .github/workflows/new-docs.yml
3+
# Backup of the original content: .github/workflows/docs.yaml.bak
4+
5+
#
6+
# name: "Documentation"
7+
#
8+
# on:
9+
# pull_request_target:
10+
# branches:
11+
# - "[0-9]+.[0-9]+"
12+
# - "[0-9]+.x"
13+
# paths:
14+
# - 'doc/**'
15+
# - '.github/workflows/docs.yaml'
16+
# - 'README.md'
17+
# push:
18+
# branches:
19+
# - "[0-9]+.[0-9]+"
20+
# - "[0-9]+.x"
21+
# - "*_actions"
22+
# paths:
23+
# - 'doc/**'
24+
# - '.github/workflows/docs.yaml'
25+
# - 'README.md'
26+
#
27+
# permissions:
28+
# contents: read
29+
#
30+
# jobs:
31+
# docs:
32+
# name: "Generate docs Pimcore Docs Generator"
33+
# runs-on: "ubuntu-latest"
34+
# steps:
35+
# - name: "Checkout code"
36+
# uses: "actions/checkout@v4"
37+
# with:
38+
# ref: ${{ github.event.pull_request.head.sha }}
39+
#
40+
# - name: "Checkout Docs Generator"
41+
# uses: "actions/checkout@v4"
42+
# with:
43+
# repository: "pimcore/docs-generator"
44+
# ref: "main"
45+
# path: "./docs-generator"
46+
# token: ${{ secrets.DOCS_GENERATOR_ACCESS_TOKEN }}
47+
#
48+
# - name: "Install Node"
49+
# uses: actions/setup-node@v4
50+
# with:
51+
# node-version: 'lts/*'
52+
# registry-url: 'https://registry.npmjs.org'
53+
#
54+
# - name: Prepare Docs
55+
# working-directory: "./docs-generator"
56+
# run: |
57+
# mkdir docs
58+
# # copy docs to working directory
59+
# cp -r ../doc ./docs/
60+
#
61+
# # copy readme to working directory
62+
# cp -r ../README.md ./docs/
63+
#
64+
# # copy index page
65+
# cp bin/resources/00_index_empty.md ./docs/00_index.md
66+
#
67+
# # use special docusaurus config (to exclude search plugin) and check for broken links
68+
# mv docusaurus.config.js.repos-tests docusaurus.config.js
69+
#
70+
# - name: Build Docs
71+
# working-directory: "./docs-generator"
72+
# run: |
73+
# npm install
74+
# npm run build
75+
#

.github/workflows/new-docs.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Documentation (Reusable)"
2+
3+
on:
4+
pull_request_target:
5+
branches:
6+
- "[0-9]+.[0-9]+"
7+
- "[0-9]+.x"
8+
- "docs_actions"
9+
paths:
10+
- "doc/**"
11+
- ".github/workflows/new-docs.yml"
12+
- "README.md"
13+
push:
14+
branches:
15+
- "[0-9]+.[0-9]+"
16+
- "[0-9]+.x"
17+
- "docs_actions"
18+
paths:
19+
- "doc/**"
20+
- ".github/workflows/new-docs.yml"
21+
- "README.md"
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
docs:
28+
uses: pimcore/workflows-collection-public/.github/workflows/reusable-docs.yaml@reusable-workflows
29+
with:
30+
docs_path: "doc"
31+
secrets:
32+
DOCS_GENERATOR_ACCESS_TOKEN: ${{ secrets.DOCS_GENERATOR_ACCESS_TOKEN }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Trigger POEditor Translations Export (Reusable)"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- "[0-9]+.x"
8+
- "docs_actions"
9+
- "main"
10+
paths:
11+
- "src/Resources/translations/admin.en.yml"
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
poeditor:
18+
uses: pimcore/workflows-collection-public/.github/workflows/reusable-poeditor.yaml@main
19+
secrets:
20+
POEDITOR_ACTION_TRIGGER_TOKEN: ${{ secrets.POEDITOR_ACTION_TRIGGER_TOKEN }}
21+

0 commit comments

Comments
 (0)