Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 72 additions & 68 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -1,69 +1,73 @@
# Original docs workflow disabled in favor of new-docs.yml
# This file is kept only for reference. The active workflow is .github/workflows/new-docs.yml
# Backup of the original content: .github/workflows/docs.yaml.bak

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@v4"
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: "Checkout Docs Generator"
uses: "actions/checkout@v4"
with:
repository: "pimcore/docs-generator"
ref: "main"
path: "./docs-generator"
token: ${{ secrets.DOCS_GENERATOR_ACCESS_TOKEN }}

- name: "Install Node"
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
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

#
# 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@v4"
# with:
# ref: ${{ github.event.pull_request.head.sha }}
# - name: "Checkout Docs Generator"
# uses: "actions/checkout@v4"
# with:
# repository: "pimcore/docs-generator"
# ref: "main"
# path: "./docs-generator"
# token: ${{ secrets.DOCS_GENERATOR_ACCESS_TOKEN }}
#
# - name: "Install Node"
# uses: actions/setup-node@v4
# with:
# node-version: 'lts/*'
# 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
#
37 changes: 37 additions & 0 deletions .github/workflows/new-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Documentation (Reusable)"

on:
pull_request_target:
branches:
- "[0-9]+.[0-9]+"
- "[0-9]+.x"
- "reusable-workflows"
paths:
- "doc/**"
- ".github/workflows/docs.yaml"
- ".github/workflows/docs.yml"
- ".github/workflows/new-docs.yml"
- "README.md"
push:
branches:
- "[0-9]+.[0-9]+"
- "[0-9]+.x"
- "*_actions"
- "reusable-workflows"
paths:
- "doc/**"
- ".github/workflows/docs.yaml"
- ".github/workflows/docs.yml"
- ".github/workflows/new-docs.yml"
- "README.md"

permissions:
contents: read

jobs:
docs:
uses: pimcore/workflows-collection-public/.github/workflows/reusable-docs.yaml@reusable-workflows
with:
docs_path: "doc"
secrets:
DOCS_GENERATOR_ACCESS_TOKEN: ${{ secrets.DOCS_GENERATOR_ACCESS_TOKEN }}
Loading