File tree Expand file tree Collapse file tree 1 file changed +70
-0
lines changed Expand file tree Collapse file tree 1 file changed +70
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This is a basic workflow to help you get started with Actions
2
+
3
+ name : deploy-pwa-gitconnected
4
+
5
+ # Controls when the action will run. Triggers the workflow on push or pull request
6
+ # events but only for the master branch
7
+ on :
8
+ push :
9
+ branches : [ master ]
10
+
11
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
12
+ jobs :
13
+ # This workflow contains a single job called "build"
14
+ build :
15
+ name : Build and test the app
16
+ # The type of runner that the job will run on
17
+ runs-on : ubuntu-latest
18
+
19
+ # Steps represent a sequence of tasks that will be executed as part of the job
20
+ steps :
21
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
22
+ - uses : actions/checkout@v2
23
+
24
+ - name : Checkout
25
+ uses : actions/checkout@v1
26
+
27
+ - name : Use Node 12.x
28
+ uses : actions/setup-node@v1
29
+ with :
30
+ node-version : ' 12.x'
31
+
32
+ - name : Install dependencies
33
+ run : npm ci
34
+
35
+ - name : Build
36
+ run : npm run build:ci
37
+
38
+ - name : Test
39
+ run : npm run test:ci
40
+
41
+ - name : Archive build
42
+ if : success()
43
+ uses : actions/upload-artifact@v1
44
+ with :
45
+ name : deploy_dist
46
+ path : dist/pwa-tutorial-gitconnected
47
+ - name : Archive code coverage result
48
+ if : success()
49
+ uses : actions/upload-artifact@v1
50
+ with :
51
+ name : deploy_coverage
52
+ path : coverage
53
+
54
+ deploy :
55
+ runs-on : ubuntu-latest
56
+ needs : build
57
+ steps :
58
+ - name : Checkout
59
+ uses : actions/checkout@v1
60
+
61
+ - name : Download build
62
+ uses : actions/download-artifact@v1
63
+ with :
64
+ name : deploy_dist
65
+ - name : Deploy to GitHub Pages
66
+ uses : JamesIves/github-pages-deploy-action@releases/v3
67
+ with :
68
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
69
+ BRANCH : gh-pages
70
+ FOLDER : dist/pwa-tutorial-gitconnected
You can’t perform that action at this time.
0 commit comments