Skip to content

5.0: Build REST API Ref W/ PHP API Ref #2744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: 5.0
Choose a base branch
from
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 27 additions & 7 deletions .github/workflows/api_refs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
version="${{ inputs.version }}"
base_branch="$(echo $version | sed 's/v\(.*\..*\)\..*/\1/')"
work_branch="api_refs_$version"
#TMP
if [[ '5.0' == $base_branch ]]; then
base_branch='5.0-api-refs'
fi
#/TMP
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "base_branch=$base_branch" >> "$GITHUB_OUTPUT"
echo "work_branch=$work_branch" >> "$GITHUB_OUTPUT"
Expand All @@ -34,25 +39,40 @@ jobs:
with:
coverage: none

- name: Set up node
uses: actions/setup-node@v4
- name: Install Redocly CLI
run: npm install -g @redocly/cli@latest

- name: Build API Refs
env:
SATIS_NETWORK_KEY: ${{ secrets.SATIS_NETWORK_KEY }}
SATIS_NETWORK_TOKEN: ${{ secrets.SATIS_NETWORK_TOKEN }}
BASE_BRANCH: ${{ steps.version_and_branches.outputs.base_branch }}
run: |
composer config --global http-basic.updates.ibexa.co $SATIS_NETWORK_KEY $SATIS_NETWORK_TOKEN
#TODO: On 5.0, update tool to handle both PHP & REST APIs
tools/php_api_ref/phpdoc.sh
# Fix escape character:
perl -pi -e 's/\e/\\E/g' tools/php_api_ref/.phpdoc/template/package-edition-map.twig
if [[ '4.6' != $BASE_BRANCH ]]; then
tools/api_refs/api_refs.sh
# Fix escape character:
perl -pi -e 's/\e/\\E/g' tools/api_refs/.phpdoc/template/package-edition-map.twig
else
tools/php_api_ref/phpdoc.sh
# Fix escape character:
perl -pi -e 's/\e/\\E/g' tools/api_refs/php_api_ref/template/package-edition-map.twig
cd tools/raml2html/; composer install; cd -;
php tools/raml2html/raml2html.php build --non-standard-http-methods=COPY,MOVE,PUBLISH,SWAP -t default -o docs/api/rest_api/rest_api_reference/ docs/api/rest_api/rest_api_reference/input/ibexa.raml
fi

- name: Commit
env:
BASE_BRANCH: ${{ steps.version_and_branches.outputs.base_branch }}
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add docs/api/php_api/php_api_reference/ tools/php_api_ref/.phpdoc/template/package-edition-map.twig
git add docs/api/php_api/php_api_reference/ tools/api_refs/.phpdoc/template/package-edition-map.twig
git commit -m "PHP API Ref HTML"
#TODO: git add doc/api/rest_api/rest_api_reference/rest_api_reference.html
#TODO: git commit -m "REST API Ref HTML"
git add doc/api/rest_api/rest_api_reference/rest_api_reference.html
git commit -m "REST API Ref HTML"

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
Expand Down

This file was deleted.

This file was deleted.

79 changes: 0 additions & 79 deletions docs/api/rest_api/rest_api_reference/assets/css/github-gist.css

This file was deleted.

Loading
Loading