File tree 2 files changed +12
-18
lines changed
2 files changed +12
-18
lines changed Original file line number Diff line number Diff line change 1
- name : Convert OpenAPI to HTML
1
+ name : Convert OpenAPI to HTML and Deploy to GitHub Pages
2
2
3
3
on :
4
4
push :
@@ -21,21 +21,15 @@ jobs:
21
21
- name : Install Redoc CLI
22
22
run : npm install -g @redocly/cli
23
23
24
- - name : Create docs directory if it doesn't exist
25
- run : mkdir -p docs
26
-
27
- - name : Generate HTML from OpenAPI YAML
24
+ - name : Generate HTML from OpenAPI JSON
28
25
run : redocly build-docs ./api/latest.json -o ./docs/index.html
29
26
30
- - name : Commit and push changes
31
- run : |
32
- git config --global user.name 'github-actions[bot]'
33
- git config --global user.email 'github-actions[bot]@users.noreply.github.com'
34
- git add docs/index.html
35
- git commit -m 'docs(api): generate HTML documentation from OpenAPI spec'
36
- git push
37
- env :
38
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39
-
40
- - name : Remove local HTML file
41
- run : rm -rf ./docs/
27
+ - name : Upload HTML Artifacts
28
+ uses : actions/upload-pages-artifact@v1
29
+ with :
30
+ path : ./docs
31
+
32
+ - name : Deploy to GitHub Pages
33
+ uses : actions/deploy-pages@v1
34
+ with :
35
+ token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1
1
{
2
2
"openapi" : " 3.0.0" ,
3
3
"info" : {
4
- "title" : " MAIDR Schema API" ,
4
+ "title" : " Test MAIDR Schema API" ,
5
5
"version" : " 1.0.0"
6
6
},
7
7
"paths" : {
You can’t perform that action at this time.
0 commit comments