Skip to content

Commit

Permalink
chore(deps): switch to pnpm and update dependencies (#16)
Browse files Browse the repository at this point in the history
* chore(deps): switch to `pnpm` and update dependencies

* fix(ci): add `pnpm` setup for ci

* fix(ci): ignore scripts and fix script name

* fix(ci): format prettier

* fix(ci): add astro sync to generate `ts` types
  • Loading branch information
felixhoffmnn authored Jul 8, 2023
1 parent 8215ec7 commit e8f283a
Show file tree
Hide file tree
Showing 9 changed files with 6,318 additions and 9,271 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/lighthouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: latest
cache: "npm"
cache: "pnpm"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
run: pnpm install --prod --ignore-scripts
- name: Build site
run: pnpm run build
- name: Run Lighthouse CI
run: |
npm install -g @lhci/cli
pnpm install -g @lhci/cli
lhci autorun
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
15 changes: 11 additions & 4 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: latest
cache: "npm"
cache: "pnpm"
- name: Install dependencies
run: npm ci
run: pnpm install --ignore-scripts
- name: Run Prettier
run: npm run prettier
run: pnpm run format:check
- name: Run ESLint
run: npm run lint
run: pnpm run lint
- name: Run TypeScript check
run: |
pnpm run sync
pnpm run check
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
pnpm exec lint-staged
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
node_modules
public
dist
pnpm-lock.yaml
Loading

0 comments on commit e8f283a

Please sign in to comment.