Skip to content

Commit

Permalink
fix: update github action with pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
Yukaii committed Jul 3, 2024
1 parent eefbcfb commit cc7e948
Showing 1 changed file with 30 additions and 13 deletions.
43 changes: 30 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,40 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
node-version: ${{ matrix.node-version }}
- name: Yarn CLI
uses: CultureHQ/[email protected]
- run: yarn
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
shell: bash
run: pnpm install

- name: Run linter
run: yarn lint
run: pnpm lint

- name: Run next build
env:
Expand All @@ -37,5 +55,4 @@ jobs:
NEXT_PUBLIC_GA_TRACKING_ID: ${{ secrets.NEXT_PUBLIC_GA_TRACKING_ID }}
HACKMD_CHANGELOG_ID: ${{ secrets.HACKMD_CHANGELOG_ID }}

run: |
yarn build
run: pnpm build

0 comments on commit cc7e948

Please sign in to comment.