Skip to content

Commit

Permalink
Updated make.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tsoganov committed Oct 29, 2024
1 parent 962546d commit 857f38c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,7 @@ jobs:
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: Check if index.html exists
run: |
if [ ! -f index.html ]; then
echo "index.html does not exist!"
exit 1
fi
- name: Add favicon
run: |
sed -i '' '8i\
<link rel="icon" type="image/png" href="docs/favicon.png"/>' index.html
run: ./make.sh

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
10 changes: 8 additions & 2 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
echo "Getting started"

# Bundle docs into zero-dependency HTML file
npx @redocly/cli build-docs openapi/openapi.yaml -o index.html && \
npx @redocly/cli build-docs openapi/openapi.yaml -o index.html

# Check if index.html exists
if [ ! -f index.html ]; then
echo "index.html does not exist!"
exit 1
fi

# Add favicon
sed -i '' '8i\
<link rel="icon" type="image/png" href="docs/favicon.png"/>' index.html && \
<link rel="icon" type="image/png" href="docs/favicon.png"/>' index.html

echo -e "\nDone!"

0 comments on commit 857f38c

Please sign in to comment.