Docs: move enjoy-docs under 1000h (#373)

* move /enjoy-docs unser 1000-h/

* fix dep
This commit is contained in:
an-lee
2024-03-02 19:54:20 +08:00
committed by GitHub
parent 22e6a1af23
commit 1876e45da3
48 changed files with 1739 additions and 4660 deletions

View File

@@ -22,21 +22,19 @@ jobs:
- uses: actions/cache@v4
with:
path: |
1000-hours/node_modules
1000-hours/**/node_modules
key: ${{ runner.os }}-${{ hashFiles('./1000-hours/package-lock.json') }}
path: "**/node_modules"
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Setup node env
uses: actions/setup-node@master
with:
node-version: "20"
- run: npm install
working-directory: 1000-hours
- name: Install dependencies
run: yarn install
- run: npm run docs:build
working-directory: 1000-hours
- name: Build
run: yarn docs:build
- name: Deploy
uses: cloudflare/wrangler-action@v3
@@ -44,4 +42,5 @@ jobs:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy .vitepress/dist --project-name=1000-hours-prod
workingDirectory: "1000-hours"
workingDirectory: "1000-hours"

View File

@@ -1,47 +0,0 @@
name: Deploy Enjoy Docs website
on:
workflow_dispatch:
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_A }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID_A }}
command: pages deploy .vitepress/dist --project-name=enjoy-docs
workingDirectory: "enjoy-docs"