88jobs :
99 prepare :
1010 runs-on : ubuntu-latest
11- strategy :
12- matrix :
13- node-version : ['14']
14- name : " [v${{ matrix.node-version }}] check"
11+ name : Checks
1512
1613 steps :
1714 - name : Checkout code
1815 uses : actions/checkout@v2
1916
20- - name : Use Node.js ${{ matrix.node-version }}
17+ - name : Use Node.js
2118 uses : actions/setup-node@v2-beta
22- with :
23- node-version : ${{ matrix.node-version }}
2419
25- # Check if cache exists, based on the hash of the lockfile
2620 - name : Cache node_modules
2721 id : cache-node_modules
2822 uses : actions/cache@v2
3428 ${{ runner.os }}-node-
3529 ${{ runner.os }}-
3630
37- # If there is no cache available, we run npm installation in CI mode
3831 - name : Install dependencies
3932 if : steps.cache-node_modules.outputs.cache-hit != 'true'
4033 run : npm ci
@@ -48,21 +41,15 @@ jobs:
4841 build-and-release :
4942 runs-on : ubuntu-latest
5043 needs : prepare
51- strategy :
52- matrix :
53- node-version : ['14']
54- name : " [v${{ matrix.node-version }}] release"
44+ name : Release
5545
5646 steps :
5747 - name : Checkout code
5848 uses : actions/checkout@v2
5949
60- - name : Use Node.js ${{ matrix.node-version }}
50+ - name : Use Node.js
6151 uses : actions/setup-node@v2-beta
62- with :
63- node-version : ${{ matrix.node-version }}
6452
65- # Check if cache exists, based on the hash of the lockfile
6653 - name : Cache node_modules
6754 id : cache-node_modules
6855 uses : actions/cache@v2
@@ -74,12 +61,10 @@ jobs:
7461 ${{ runner.os }}-node-
7562 ${{ runner.os }}-
7663
77- # If there is no cache available, we run npm installation in CI mode
7864 - name : Install dependencies
7965 if : steps.cache-node_modules.outputs.cache-hit != 'true'
8066 run : npm ci
8167
82- # Build and check if it builds ok.
8368 - name : Build
8469 env :
8570 BUNDLESIZE_GITHUB_TOKEN : ${{ secrets.BUNDLESIZE }}
9075 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
9176 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9277 run : npm run release
78+
79+ docs :
80+ runs-on : ubuntu-latest
81+ needs : prepare
82+ name : Publish documentation
83+
84+ steps :
85+ - name : Checkout code
86+ uses : actions/checkout@v2
87+
88+ - name : Use Node.js
89+ uses : actions/setup-node@v2-beta
90+
91+ - name : Cache node_modules
92+ id : cache-node_modules
93+ uses : actions/cache@v2
94+ with :
95+ path : node_modules
96+ key : ${{ runner.os }}-node-${{matrix.node-version}}-${{ hashFiles('**/package-lock.json') }}
97+ restore-keys : |
98+ ${{ runner.os }}-node-${{matrix.node-version}}-
99+ ${{ runner.os }}-node-
100+ ${{ runner.os }}-
101+
102+ - name : Install dependencies
103+ if : steps.cache-node_modules.outputs.cache-hit != 'true'
104+ run : npm ci
105+
106+ - name : Build
107+ run : npm run deploy:docs
0 commit comments