File tree 3 files changed +40
-7
lines changed
3 files changed +40
-7
lines changed Original file line number Diff line number Diff line change
1
+ name : main workflow
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+
8
+ jobs :
9
+ test_deploy :
10
+ name : test and deploy Outliner
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - uses : actions/checkout@v1
15
+ - name : Use Node.js 12.x
16
+ uses : actions/setup-node@v1
17
+ with :
18
+ node-version : 12.x
19
+ - name : yarn install and test
20
+ run : |
21
+ yarn install
22
+ yarn jest --coverage -w=2
23
+ - name : SonarCloud Trigger
24
+ uses : sonarsource/sonarcloud-github-action@master
25
+ env :
26
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
27
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
28
+ - name : build project
29
+ run : |
30
+ yarn build
31
+ - name : deploy to github pages
32
+ uses : JamesIves/github-pages-deploy-action@master
33
+ env :
34
+ ACCESS_TOKEN : ${{ secrets.ACCESS_TOKEN }}
35
+ BRANCH : gh-pages
36
+ FOLDER : dist
Original file line number Diff line number Diff line change 1
1
const path = require ( 'path' )
2
2
const webpack = require ( 'webpack' )
3
3
const HtmlWebpackPlugin = require ( 'html-webpack-plugin' )
4
- const CleanWebpackPlugin = require ( "clean-webpack-plugin" )
4
+ const { CleanWebpackPlugin} = require ( "clean-webpack-plugin" )
5
5
const MiniCssExtractPlugin = require ( "mini-css-extract-plugin" ) ;
6
6
const BundleAnalyzerPlugin = require (
7
7
"webpack-bundle-analyzer" ) . BundleAnalyzerPlugin
@@ -78,10 +78,7 @@ module.exports = {
78
78
modules : false ,
79
79
} ,
80
80
plugins : [
81
- new CleanWebpackPlugin ( [ "dist" ] , {
82
- root : path . resolve ( __dirname , "../" ) ,
83
- verbose : true ,
84
- } ) ,
81
+ new CleanWebpackPlugin ( ) ,
85
82
new webpack . DefinePlugin ( {
86
83
"process.env.NODE_ENV" : JSON . stringify ( "production" ) ,
87
84
} ) ,
Original file line number Diff line number Diff line change 1
1
sonar.host.url =https://sonarcloud.io
2
- # sonar.login=d5dc4bc808334e2350df42804f6d6d5aa9250940
2
+ # sonar.login=e9cbb927bedab0008c70acf3639a52574171a704
3
3
sonar.sourceEncoding =UTF-8
4
4
sonar.projectKey =Yixi_outliner
5
5
sonar.projectName =outliner
6
- sonar.organization =yixi-github
6
+ sonar.organization =yixi
7
7
sonar.typescript.lcov.reportPaths =coverage/lcov.info
8
8
sonar.sources =src/
9
9
sonar.exclusions =**/node_modules/**,**/*.test.ts,**/*.test.tsx
You can’t perform that action at this time.
0 commit comments