-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1004 Bytes
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Deploy API Documentation
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build docs
run: |
echo "Getting started"
# Bundle docs into zero-dependency HTML file
npx @redocly/cli build-docs openapi/openapi.yaml -o index.html
- name: Add favicon
run: |
sed -i '' '8i\
<link rel="icon" type="image/png" href="docs/favicon.png"/>' index.html
- name: Check if index.html exists
run: |
if [ ! -f index.html ]; then
echo "index.html does not exist!"
exit 1
fi
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .
force_orphan: true
exclude_assets: '.github,openapi,redocly.yaml,LICENSE,README.md,make.sh'