Skip to content

Commit 79349b7

Browse files
committed
ci: update workflow
1 parent 4a2f013 commit 79349b7

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

Diff for: .github/workflows/generate-docs.yml

+11-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Convert OpenAPI to HTML
1+
name: Convert OpenAPI to HTML and Deploy to GitHub Pages
22

33
on:
44
push:
@@ -21,21 +21,15 @@ jobs:
2121
- name: Install Redoc CLI
2222
run: npm install -g @redocly/cli
2323

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
2825
run: redocly build-docs ./api/latest.json -o ./docs/index.html
2926

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 }}

Diff for: api/latest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"openapi": "3.0.0",
33
"info": {
4-
"title": "MAIDR Schema API",
4+
"title": "Test MAIDR Schema API",
55
"version": "1.0.0"
66
},
77
"paths": {

0 commit comments

Comments
 (0)