Skip to content

Commit

Permalink
ISSUE-337: name fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tatevikg1 committed Dec 16, 2024
1 parent 1e4294c commit da1aaaf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 741 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/restapi-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ jobs:
run: composer install --no-interaction --prefer-dist

- name: Generate OpenAPI Specification JSON
run: vendor/bin/openapi -o docs/openapi.json --format json src
run: vendor/bin/openapi -o docs/latest-restapi.json --format json src

- name: Upload REST API Specification
uses: actions/upload-artifact@v3
with:
name: openapi-json
path: docs/openapi.json
name: restapi-json
path: docs/latest-restapi.json

deploy-docs:
name: Deploy REST API Specification
Expand All @@ -63,12 +63,13 @@ jobs:
uses: actions/download-artifact@v3
with:
name: restapi-json
path: docs

- name: Validate OpenAPI Specification
run: openapi-checker docs/openapi.json
run: openapi-checker docs/latest-restapi.json

- name: Compare Specifications
run: git diff --no-index --output=restapi-diff.txt docs/openapi.json restapi.json || true
run: git diff --no-index --output=restapi-diff.txt docs/latest-restapi.json restapi.json || true

- name: Check Differences and Decide Deployment
id: allow-deploy
Expand All @@ -84,9 +85,9 @@ jobs:
- name: Commit and Deploy Updates
if: env.DEPLOY == 'true'
run: |
mv docs/openapi.json docs/restapi.json
mv docs/latest-restapi.json docs/restapi.json
git config user.name "github-actions"
git config user.email "[email protected]"
git add docs/restapi.json
git commit -m "Update REST API documentation `date`"
git push origin main --force
git push
Loading

0 comments on commit da1aaaf

Please sign in to comment.