@@ -31,13 +31,13 @@ jobs:
31
31
run : composer install --no-interaction --prefer-dist
32
32
33
33
- name : Generate OpenAPI Specification JSON
34
- run : vendor/bin/openapi -o docs/ latest-restapi.json --format json src
34
+ run : vendor/bin/openapi -o latest-restapi.json --format json src
35
35
36
36
- name : Upload REST API Specification
37
37
uses : actions/upload-artifact@v4
38
38
with :
39
39
name : restapi-json
40
- path : docs/ latest-restapi.json
40
+ path : latest-restapi.json
41
41
42
42
deploy-docs :
43
43
name : Deploy REST API Specification
@@ -66,10 +66,10 @@ jobs:
66
66
path : docs
67
67
68
68
- name : Validate OpenAPI Specification
69
- run : swagger-cli validate docs/ latest-restapi.json
69
+ run : swagger-cli validate latest-restapi.json
70
70
71
71
- name : Compare Specifications
72
- run : git diff --no-index --output=restapi-diff.txt docs/ latest-restapi.json restapi.json || true
72
+ run : git diff --no-index --output=restapi-diff.txt latest-restapi.json restapi.json || true
73
73
74
74
- name : Check Differences and Decide Deployment
75
75
id : allow-deploy
85
85
- name : Commit and Deploy Updates
86
86
if : env.DEPLOY == 'true'
87
87
run : |
88
- mv docs/ latest-restapi.json docs/ restapi.json
88
+ mv latest-restapi.json restapi.json
89
89
git config user.name "github-actions"
90
90
git config user.email "[email protected] "
91
- git add docs/ restapi.json
91
+ git add restapi.json
92
92
git commit -m "Update REST API documentation `date`"
93
93
git push
0 commit comments