Skip to content

Commit 4e5cb7f

Browse files
authored
Merge pull request #18 from ReLive27/main
chore: add GitHub Actions workflow for automatic API docs deployment
2 parents 58c7733 + b6c4778 commit 4e5cb7f

3 files changed

Lines changed: 30 additions & 11 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Build docs
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Build docs
13+
run: ./make.sh
14+
- name: Deploy to GitHub Pages
15+
uses: peaceiris/actions-gh-pages@v3
16+
with:
17+
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
18+
publish_dir: ./docs
19+
force_orphan: false

.github/workflows/make.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
echo "Getting started"
4+
5+
# Bundle docs into zero-dependency HTML file
6+
npx @redocly/cli build-docs ./openapi/simple-auth0.yaml && \
7+
mv redoc-static.html index.html && \
8+
echo "Changed name from redoc-static.html to index.html" && \
9+
# Add favicon
10+
#sed -i '7 i \ \ <link rel="icon" type="image/png" href="images/favicon.png"/>' index.html && \
11+
echo -e "\nDone!"

docs/index.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)