Skip to content
Open
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
24 changes: 22 additions & 2 deletions .github/workflows/openapi_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
image: node:24-alpine
permissions:
contents: write
actions: write
steps:
- name: Checkout main
uses: actions/checkout@v7
Expand Down Expand Up @@ -46,10 +47,29 @@ jobs:
cp -r main/docs/openapi/dist/. gh-pages/openapi/

- name: Commit and push
id: commit
working-directory: gh-pages
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add openapi
git diff --cached --quiet && echo "No changes to publish" || \
(git commit -m "Update openapi docs from ${GITHUB_SHA}" && git push)
if git diff --cached --quiet; then
echo "No changes to publish"
echo "changed=false" >> "$GITHUB_OUTPUT"
else
git commit -m "Update openapi docs from ${GITHUB_SHA}"
git push
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Trigger Pages deployment
if: steps.commit.outputs.changed == 'true'
uses: actions/github-script@v7
with:
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'deploy_v3_docs.yml',
ref: 'gh-pages',
});
Loading