diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index b9e30c76..9e0c4f83 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -14,19 +14,17 @@ jobs: uses: actions/setup-node@v2.1.2 with: node-version: "12.x" - - name: Get yarn cache - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - name: Cache dependencies uses: actions/cache@v2 with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + # npm キャッシュファイルは Linux/macOS の `~/.npm` に保存される + path: ~/.npm + key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} restore-keys: | - ${{ runner.os }}-yarn- - - run: yarn install --frozen-lockfile - - run: yarn build - - run: yarn export + ${{ runner.os }}-npm- + - run: npm ci + - run: npm run build + - run: npm run export - name: Deploy uses: peaceiris/actions-gh-pages@v3.7.3 with: