Skip to content

Commit

Permalink
chore: fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
SharerMax committed Dec 3, 2023
1 parent ed91703 commit b8edbb9
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 7 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: setup nodejs
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
repository: v2fly/domain-list-community
fetch-depth: 1
sparse-checkout: |
data
path: 'data'
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Run script
run: |
tree
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"type": "module",
"scripts": {
"build": "rimraf dist/* && tsx src/main.ts",
"dev": "DEBUG=* tsx watch src/main.ts"
"dev": "DEBUG=* tsx watch src/main.ts",
"download": "rimraf data && giget gh:v2fly/domain-list-community/data#master data"
},
"keywords": [],
"author": "",
Expand All @@ -21,6 +22,7 @@
"@types/debug": "^4.1.12",
"@types/node": "^20.10.2",
"eslint": "^8.55.0",
"giget": "^1.1.3",
"rimraf": "^5.0.5",
"tsx": "^4.6.2",
"typescript": "^5.3.2"
Expand Down
104 changes: 104 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b8edbb9

Please sign in to comment.