Docs: Add enjoy docs (#370)

* init vitepress in enjoy-docs

* update config

* update docs

* upgrade deps

* update settings

* add more docs

* more docs

* update commands

* site config

* add ga

* tweak
This commit is contained in:
an-lee
2024-03-02 16:36:06 +08:00
committed by GitHub
parent 9ffcffe7f5
commit 54935aa7e9
34 changed files with 1896 additions and 296 deletions

46
.github/workflows/deploy-enjoy-docs.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Deploy Enjoy Docs website
on:
push:
branches:
- main
paths:
- "enjoy-docs/**"
pull_request:
branches:
- main
paths:
- "enjoy-docs/**"
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
# checkout the code
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Setup node env
uses: actions/setup-node@master
with:
node-version: "20"
- name: Install Independents
run: yarn install
- name: Build
run: yarn docs:build
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy .vitepress/dist --project-name=enjoy-docs
workingDirectory: "enjoy-docs"