File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : gh-pages
2
+ on :
3
+ push :
4
+ branches :
5
+ - master
6
+
7
+ jobs :
8
+ demo :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Set up Node.js ${{ matrix.node-version }}
12
+ uses : actions/setup-node@v1
13
+ with :
14
+ node-version : ${{ matrix.node-version }}
15
+
16
+ - name : Get yarn cache directory path
17
+ id : init
18
+ shell : bash
19
+ run : |
20
+ echo "::set-output name=yarn_cache::$(yarn cache dir)"
21
+ #
22
+ echo "Node $(node --version)"
23
+ echo "Yarn $(yarn --version)"
24
+ - uses : actions/checkout@v2
25
+
26
+ - name : Cache Yarn packages
27
+ id : yarn_cache_packages
28
+ uses : actions/cache@v1
29
+ with :
30
+ path : ${{ steps.init.outputs.yarn_cache }}
31
+ key : ${{ runner.os }}-yarn_cache-${{ hashFiles('yarn.lock') }}
32
+ restore-keys : |
33
+ ${{ runner.os }}-yarn_cache-
34
+ - name : Cache node_modules
35
+ uses : actions/cache@v1
36
+ with :
37
+ path : node_modules
38
+ key : ${{ runner.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('yarn.lock') }}
39
+ restore-keys : |
40
+ ${{ runner.os }}-${{ matrix.node-version }}-yarn-
41
+
42
+ - name : Installing
43
+ run : yarn --frozen-lockfile --perfer-offline --link-duplicates
44
+
45
+ - name : Build demo
46
+ run : yarn build:demo
47
+
48
+ - name : Deploy demo
49
+ run : |
50
+ git config --global user.email $GIT_AUTHOR_EMAIL
51
+ git config --global user.name $GIT_AUTHOR_NAME
52
+ yarn run gh-pages-clean
53
+ yarn deploy
54
+ env :
55
+ GIT_AUTHOR_EMAIL : ${{ secrets.GIT_AUTHOR_EMAIL }}
56
+ GIT_AUTHOR_NAME : ${{ secrets.GIT_AUTHOR_NAME }}
57
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
58
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments