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

View File

@@ -49,7 +49,7 @@ jobs:
APPLE_ID: ${{ runner.os == 'macOS' && secrets.APPLE_ID || '' }}
APPLE_APP_PASSWORD: ${{ runner.os == 'macOS' && secrets.APPLE_APP_PASSWORD || '' }}
APPLE_TEAM_ID: ${{ runner.os == 'macOS' && secrets.APPLE_TEAM_ID || '' }}
run: yarn run make:enjoy
run: yarn run enjoy:make
- name: Upload artifact
uses: actions/upload-artifact@v4

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"

View File

@@ -30,7 +30,7 @@ jobs:
APPLE_ID: ${{ runner.os == 'macOS' && secrets.APPLE_ID || '' }}
APPLE_APP_PASSWORD: ${{ runner.os == 'macOS' && secrets.APPLE_APP_PASSWORD || '' }}
APPLE_TEAM_ID: ${{ runner.os == 'macOS' && secrets.APPLE_TEAM_ID || '' }}
run: yarn publish:enjoy
run: yarn enjoy:publish
- name: Upload artifact
uses: actions/upload-artifact@v4

View File

@@ -46,7 +46,7 @@ jobs:
- name: Run tests on macOS or Windows
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
run: yarn test:enjoy
run: yarn enjoy:test
- uses: actions/upload-artifact@v4
if: always()