Skip to content

Commit

Permalink
chore: use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
wxsms committed Nov 6, 2021
1 parent e460d91 commit ae89dfb
Show file tree
Hide file tree
Showing 8 changed files with 9,039 additions and 8,955 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/main.yaml
Expand Up @@ -9,25 +9,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v2
- run: yarn --frozen-lockfile
- uses: pnpm/action-setup@v2.0.1
with:
version: latest
- run: pnpm i --frozen-lockfile
- name: Lint
run: npm run lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v2
- run: yarn --frozen-lockfile
- uses: pnpm/action-setup@v2.0.1
with:
version: latest
- run: pnpm i --frozen-lockfile
- name: Unit tests
run: npm run test
docs_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v2
- run: yarn --frozen-lockfile
env:
PUPPETEER_SKIP_DOWNLOAD: true
- uses: pnpm/action-setup@v2.0.1
with:
version: latest
- run: pnpm i --frozen-lockfile
- name: Build docs
run: npm run docs:build
6 changes: 4 additions & 2 deletions .github/workflows/publish_github.yaml
Expand Up @@ -19,7 +19,9 @@ jobs:
KEY: name
VALUE: "@wxsms/vuepress-theme-mini"
FILE: package.json
- uses: c-hive/gha-yarn-cache@v2
- run: yarn --frozen-lockfile
- uses: pnpm/action-setup@v2.0.1
with:
version: latest
- run: pnpm i --frozen-lockfile
- run: echo //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }} >> .npmrc
- run: npm publish --registry=https://npm.pkg.github.com
6 changes: 4 additions & 2 deletions .github/workflows/publish_github_release.yaml
Expand Up @@ -13,8 +13,10 @@ jobs:
with:
fetch-depth: 0
ref: master
- uses: c-hive/gha-yarn-cache@v2
- run: yarn --frozen-lockfile
- uses: pnpm/action-setup@v2.0.1
with:
version: latest
- run: pnpm i --frozen-lockfile
- name: Changelog
uses: scottbrenner/generate-changelog-action@master
id: Changelog
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publish_npm.yaml
Expand Up @@ -10,11 +10,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v2
- uses: actions/setup-node@v2
with:
node-version: 12
- run: yarn --frozen-lockfile
- uses: pnpm/action-setup@v2.0.1
with:
version: latest
- run: pnpm i --frozen-lockfile
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
7 changes: 4 additions & 3 deletions .github/workflows/publish_pages.yaml
Expand Up @@ -9,13 +9,14 @@ jobs:
deploy_gh_pages:
runs-on: ubuntu-latest
steps:
# checkout & yarn
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: master
- uses: c-hive/gha-yarn-cache@v2
- run: yarn --frozen-lockfile
- uses: pnpm/action-setup@v2.0.1
with:
version: latest
- run: pnpm i --frozen-lockfile
# build
- run: npm run docs:build
- name: GitHub Pages
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -18,7 +18,7 @@
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs",
"lint": "eslint --ext .js,.vue .",
"lint:fix": "npm run lint -- --fix"
"lint:fix": "pnpm run lint -- --fix"
},
"dependencies": {
"@vuepress/plugin-back-to-top": "^1.8.2",
Expand Down

0 comments on commit ae89dfb

Please sign in to comment.