Skip to content

Commit

Permalink
chore: Simplify file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
WCY-dt committed Jun 17, 2024
1 parent c63080a commit fbac941
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 24 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,39 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install docsify-cli
run: npm i docsify-cli -g

- name: Install docsify-tools
run: npm i docsify-tools -g

- name: Generate sidebar
run: docsify-auto-sidebar -d .

- name: Generate index.html
run: |
echo '<!DOCTYPE html>' > index.html
echo '<html lang="en">' >> index.html
echo '<head>' >> index.html
echo ' <meta charset="UTF-8">' >> index.html
echo ' <meta name="viewport" content="width=device-width, initial-scale=1.0">' >> index.html
echo ' <title>TIL</title>' >> index.html
echo ' <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify@4/themes/vue.css" />' >> index.html
echo '</head>' >> index.html
echo '<body>' >> index.html
echo ' <div id="app"></div>' >> index.html
echo ' <script>' >> index.html
echo ' window.$docsify = {' >> index.html
echo ' loadSidebar: true,' >> index.html
echo ' subMaxLevel: 2' >> index.html
echo ' }' >> index.html
echo ' </script>' >> index.html
echo ' <script src="https://cdn.jsdelivr.net/npm/docsify@4"></script>' >> index.html
echo '</body>' >> index.html
echo '</html>' >> index.html
- name: Generate .nojekyll
run: touch .nojekyll
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
Expand Down
Empty file removed .nojekyll
Empty file.
19 changes: 0 additions & 19 deletions index.html

This file was deleted.

0 comments on commit fbac941

Please sign in to comment.