Skip to content

Commit 2142752

Browse files
authored
Merge pull request #29 from Code-Hex/fix/ci
fixed actions for using npm
2 parents eee5c37 + 753448d commit 2142752

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

.github/workflows/gh-pages.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,17 @@ jobs:
1414
uses: actions/setup-node@v2.1.2
1515
with:
1616
node-version: "12.x"
17-
- name: Get yarn cache
18-
id: yarn-cache
19-
run: echo "::set-output name=dir::$(yarn cache dir)"
2017
- name: Cache dependencies
2118
uses: actions/cache@v2
2219
with:
23-
path: ${{ steps.yarn-cache.outputs.dir }}
24-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
20+
# npm キャッシュファイルは Linux/macOS の `~/.npm` に保存される
21+
path: ~/.npm
22+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
2523
restore-keys: |
26-
${{ runner.os }}-yarn-
27-
- run: yarn install --frozen-lockfile
28-
- run: yarn build
29-
- run: yarn export
24+
${{ runner.os }}-npm-
25+
- run: npm ci
26+
- run: npm run build
27+
- run: npm run export
3028
- name: Deploy
3129
uses: peaceiris/actions-gh-pages@v3.7.3
3230
with:

0 commit comments

Comments
 (0)