Skip to content

Commit

Permalink
Refactor(ci): Use setup-node cache instead of bahmutov/npm-install
Browse files Browse the repository at this point in the history
  * it appears that the caching ability of the library is broken
  * @see: bahmutov/npm-install#146
  • Loading branch information
literat committed Sep 11, 2024
1 parent 276c7b3 commit 1d6f21c
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,28 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Enable Corepack
run: corepack enable

- name: Fetch Git history
run: git fetch --no-tags --depth=50 origin main
cache: 'yarn'

- name: Install dependencies
uses: bahmutov/[email protected]
with:
useRollingCache: true
install-command: yarn --immutable
run: yarn --immutable

- name: Check node_modules or .yarn/cache
run: |
ls -la
if [ -d "node_modules" ]; then
echo "node_modules exists"
elif [ -d ".yarn/cache" ]; then
echo ".yarn/cache exists"
else
echo "Dependency directory not found"
fi
- name: Build packages
run: yarn build

0 comments on commit 1d6f21c

Please sign in to comment.