Skip to content

Commit

Permalink
Revert "ci(all): 👷 update (#513)"
Browse files Browse the repository at this point in the history
This reverts commit 82f9926.
  • Loading branch information
BeiyanYunyi committed Dec 28, 2024
1 parent 82f9926 commit 8f81a1c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 47 deletions.
31 changes: 13 additions & 18 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,40 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write

steps:
# 第一步:检出代码
- name: 检出代码
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
fetch-depth: 0

# 第二步:安装 pnpm
- name: 安装 pnpm
uses: pnpm/action-setup@v4

# 第三步:安装 node 并配置缓存
- name: 设置 Node.js 环境
uses: actions/setup-node@v4
uses: pnpm/action-setup@v3
with:
node-version: 'latest'
registry-url: 'https://registry.npmjs.org/'
cache: 'pnpm'
version: latest

# 第四步:安装依赖
# 第三步:安装依赖
- name: 安装依赖
run: pnpm install

- name: 更新主题包
run: pnpm update @project-trans/vitepress-theme-project-trans@prerelease

# 第五步:构建项目
# 第四步:构建项目
- name: 构建项目
run: pnpm build # 构建 VitePress 项目

# 第五步:安装 Wrangler
- name: 安装 Wrangler
run: pnpm add -g wrangler@3 # 安装 Wrangler v3

# 第六步:发布到 Cloudflare Pages
- name: 发布到 Cloudflare Pages
uses: cloudflare/wrangler-action@v3
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }} # Cloudflare Pages API Token
accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT }} # Cloudflare 账户 ID
command: pages deploy docs/.vitepress/dist --project-name=rle-wiki
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: rle-wiki # Cloudflare Pages 项目名称
directory: docs/.vitepress/dist # 构建输出目录
22 changes: 8 additions & 14 deletions .github/workflows/preview-pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "docs/**"
- "package.json"
- "packages/**"
- 'docs/**'
- 'package.json'
- 'packages/**'

jobs:
deploy:
Expand All @@ -29,26 +29,20 @@ jobs:
- name: 安装 pnpm
uses: pnpm/action-setup@v4

# 第四步:安装 node 并配置缓存
- name: 设置 Node.js 环境
uses: actions/setup-node@v4
with:
node-version: "latest"
registry-url: "https://registry.npmjs.org/"
cache: "pnpm"

# 第五步:安装依赖
# 第四步:安装依赖
- name: 安装依赖
run: pnpm install

- name: 更新主题包
run: pnpm update @project-trans/vitepress-theme-project-trans@prerelease

# 第六步:构建项目
# 第五步:构建项目
- name: 构建项目
run: pnpm build # 构建 VitePress 项目

# 第六步:发布到 Cloudflare Pages
- name: 安装 Wrangler
run: npm install -g wrangler@^3.90.0

- name: Deploy to Cloudflare Pages
id: deploy
uses: cloudflare/wrangler-action@v3
Expand Down
24 changes: 9 additions & 15 deletions .github/workflows/update-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,17 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write

steps:
- name: 检出代码
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: 安装 pnpm
uses: pnpm/action-setup@v4

- name: 设置 Node.js 环境
uses: actions/setup-node@v4
uses: pnpm/action-setup@v3
with:
node-version: 'latest'
registry-url: 'https://registry.npmjs.org/'
cache: 'pnpm'
version: latest

- name: 安装依赖
run: pnpm install
Expand All @@ -40,11 +32,13 @@ jobs:
- name: 构建项目
run: pnpm build # 构建 VitePress 项目

- name: 安装 Wrangler
run: pnpm add -g wrangler@3 # 安装 Wrangler v3

- name: 发布到 Cloudflare Pages
uses: cloudflare/wrangler-action@v3
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }} # Cloudflare Pages API Token
accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT }} # Cloudflare 账户 ID
command: pages deploy docs/.vitepress/dist --project-name=rle-wiki
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: rle-wiki # Cloudflare Pages 项目名称
directory: docs/.vitepress/dist # 构建输出目录

0 comments on commit 8f81a1c

Please sign in to comment.