-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added docs generation action test (#141)
...for verifying docs
- Loading branch information
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
|
||
name: "Documentation" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "[0-9]+.[0-9]+" | ||
- "[0-9]+.x" | ||
paths: | ||
- 'doc/**' | ||
- '.github/workflows/docs.yaml' | ||
push: | ||
branches: | ||
- "[0-9]+.[0-9]+" | ||
- "[0-9]+.x" | ||
- "*_actions" | ||
paths: | ||
- 'doc/**' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
docs: | ||
name: "Generate docs Pimcore Docs Generator" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checkout code" | ||
uses: "actions/checkout@v3" | ||
|
||
- 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 | ||