File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy
2+
3+ on :
4+ push :
5+ branches : [main]
6+ workflow_dispatch :
7+
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ strategy :
14+ matrix :
15+ node-version : [16.x]
16+
17+ steps :
18+ - uses : actions/checkout@v3
19+ - name : Use Node.js ${{ matrix.node-version }}
20+ uses : actions/setup-node@v3
21+ with :
22+ node-version : ${{ matrix.node-version }}
23+ - name : Cache pnpm modules
24+ uses : actions/cache@v3
25+ env :
26+ cache-name : cache-pnpm-modules
27+ with :
28+ path : ~/.pnpm-store
29+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
30+ restore-keys : |
31+ ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
32+ - uses : pnpm/action-setup@v2.2.4
33+ with :
34+ version : latest
35+ run_install : |
36+ - recursive: true
37+ args: [--no-frozen-lockfile]
38+ - run : |
39+ pnpm run build
40+ mkdir -p dist
41+ cp -r docs/.vitepress/dist/* dist/
42+ echo 'mog.js.org' > dist/CNAME
43+ - name : Deploy
44+ uses : peaceiris/actions-gh-pages@v3
45+ with :
46+ github_token : ${{ secrets.GITHUB_TOKEN }}
47+ publish_dir : dist
48+ env :
49+ CI : true
You can’t perform that action at this time.
0 commit comments