Skip to content

Commit 5ae7268

Browse files
committed
ISSUE-337: name fix
1 parent 1e4294c commit 5ae7268

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

.github/workflows/restapi-docs.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ jobs:
3131
run: composer install --no-interaction --prefer-dist
3232

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

3636
- name: Upload REST API Specification
3737
uses: actions/upload-artifact@v3
3838
with:
39-
name: openapi-json
40-
path: docs/openapi.json
39+
name: restapi-json
40+
path: docs/latest-restapi.json
4141

4242
deploy-docs:
4343
name: Deploy REST API Specification
@@ -63,12 +63,13 @@ jobs:
6363
uses: actions/download-artifact@v3
6464
with:
6565
name: restapi-json
66+
path: docs
6667

6768
- name: Validate OpenAPI Specification
68-
run: openapi-checker docs/openapi.json
69+
run: openapi-checker docs/latest-restapi.json
6970

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

7374
- name: Check Differences and Decide Deployment
7475
id: allow-deploy
@@ -84,9 +85,9 @@ jobs:
8485
- name: Commit and Deploy Updates
8586
if: env.DEPLOY == 'true'
8687
run: |
87-
mv docs/openapi.json docs/restapi.json
88+
mv docs/latest-restapi.json docs/restapi.json
8889
git config user.name "github-actions"
8990
git config user.email "[email protected]"
9091
git add docs/restapi.json
9192
git commit -m "Update REST API documentation `date`"
92-
git push origin main --force
93+
git push

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"@update-configuration"
8282
],
8383
"openapi-generate": [
84-
"vendor/bin/openapi -o docs/openapi.json --format json src"
84+
"vendor/bin/openapi -o docs/latest-restapi.json --format json src"
8585
]
8686
},
8787
"extra": {
File renamed without changes.

0 commit comments

Comments
 (0)