Skip to content

Commit 31c146d

Browse files
committed
ci: fix gh-pages deploy action
1 parent f5fddca commit 31c146d

File tree

2 files changed

+29
-11
lines changed

2 files changed

+29
-11
lines changed

.github/workflows/deploy.yml

+29-9
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,33 @@ jobs:
99
deploy:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@master
13-
- uses: actions/setup-node@v1
12+
- uses: actions/checkout@v2
13+
14+
- name: Setup Node 🔧
15+
uses: actions/setup-node@v2
16+
with:
17+
node-version: '14'
18+
19+
- name: Get yarn cache 📤
20+
id: yarn-cache
21+
run: echo "::set-output name=dir::$(yarn cache dir)"
22+
23+
- name: Cache dependencies 📥
24+
uses: actions/cache@v2
25+
with:
26+
path: ${{ steps.yarn-cache.outputs.dir }}
27+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
28+
restore-keys: |
29+
${{ runner.os }}-yarn-
30+
31+
- name: Install dependencies ⚙️
32+
run: yarn install --frozen-lockfile
33+
34+
- name: Create production build 🔧
35+
run: yarn build
36+
37+
- name: Deploy to gh-pages 🚀
38+
uses: peaceiris/actions-gh-pages@v3
1439
with:
15-
node-version: '14.x'
16-
- name: 🖇️ Installing dependencies
17-
run: yarn --frozen-lockfile
18-
- name: 🚀 Deploying to gh-pages
19-
run: yarn deploy
20-
env:
21-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
publish_dir: ./dist

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
"dev": "webpack serve --mode development --config webpack.common.ts",
88
"build": "webpack --mode production --config webpack.common.ts",
99
"postbuild": "ts-node ./scripts/postbuild.ts",
10-
"predeploy": "yarn build",
11-
"deploy": "gh-pages -d dist",
1210
"prepare": "husky install",
1311
"serve": "serve dist"
1412
},

0 commit comments

Comments
 (0)