Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新依赖,忽略pnpm #43

Merged
merged 8 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/workflows/charts.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
# This is a basic workflow to help you get started with Actions

name: Get Charts Info

# Controls when the workflow will run
on:
workflow_call:

env:
TZ: Asia/Shanghai

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
cache: pnpm

- name: Install deps
run: pnpm install

- name: Build
env:
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB_TOKEN_NORTHWORD_GHOST }}
run: |
npm install
npm run get-chart
pnpm run get-chart

- name: Upload Output
uses: actions/upload-artifact@v3
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
schedule:
- cron: "25 1 * * *"
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
Expand All @@ -17,7 +13,6 @@ permissions:
env:
TZ: Asia/Shanghai

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
plugins-info:
name: Plugins Info
Expand All @@ -35,7 +30,6 @@ jobs:
- charts
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/plugins-info.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# This is a basic workflow to help you get started with Actions

name: Get Plugins Info

# Controls when the workflow will run
on:
workflow_call:

Expand All @@ -12,30 +9,36 @@ permissions:
env:
TZ: Asia/Shanghai

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
cache: pnpm

- name: Install deps
run: pnpm install

- name: Build
env:
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB_TOKEN_NORTHWORD_GHOST }}
run: |
npm install
npm run get-info
pnpm run get-info

- name: Upload Output
uses: actions/upload-artifact@v3
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
**/build
# node
node_modules
package-lock.json
# pnpm-lock.yaml

# build
**/build
dist

# tmp
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,17 @@ git clone https://github.com/northword/zotero-plugins.git zotero-plugins
cd zotero-plugins

# 安装依赖
npm install
npm install -g pnpm
pnpm install

# 运行构建脚本
npm run get-info
# 构建插件信息表格
pnpm run get-info

# 启动网页服务器
npm run website
# 启动网页预览服务器
pnpm run website

# 插件排行榜图表页面
npm run get-chart
# 构建插件排行榜图表页面
pnpm run get-chart
```

## 致谢
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
"homepage": "https://github.com/northword/zotero-plugins#readme",
"type": "module",
"devDependencies": {
"highcharts": "^11.1.0",
"@highcharts/dashboards": "^1.1.1",
"@highcharts/dashboards": "^1.1.2",
"@vitalets/google-translate-api": "^9.2.0",
"cross-env": "^7.0.3",
"docsify-cli": "^4.4.4",
"franc-min": "^6.1.0",
"google-translate-api-x": "^10.6.7",
"highcharts": "^11.2.0",
"markdown-table-ts": "^1.0.3",
"octokit": "^3.1.0",
"octokit": "^3.1.2",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
"typescript": "^5.3.2"
}
}
Loading