Commit d2cba4c 1 parent e96254c commit d2cba4c Copy full SHA for d2cba4c
File tree 1 file changed +41
-0
lines changed
1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CI/CD
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+
7
+ jobs :
8
+ build :
9
+
10
+ runs-on : ubuntu-latest
11
+
12
+ strategy :
13
+ matrix :
14
+ node-version : [12.x]
15
+
16
+ steps :
17
+ - name : Checkout repository
18
+ uses : actions/checkout@v2
19
+
20
+ - name : Set up Node.js ${{ matrix.node-version }}
21
+ uses : actions/setup-node@v1
22
+ with :
23
+ node-version : ${{ matrix.node-version }}
24
+
25
+ - name : Install dependencies
26
+ run : npm install
27
+
28
+ - name : Build
29
+ run : npm run build
30
+
31
+ - name : Deploy
32
+ run : |
33
+ git config --global user.name $user_name
34
+ git config --global user.email $user_email
35
+ git remote set-url origin https://${github_token}@github.com/${repository}
36
+ npm run deploy
37
+ env :
38
+ user_name : ' github-actions[bot]'
39
+ user_email : ' github-actions[bot]@users.noreply.github.com'
40
+ github_token : ${{ secrets.GITHUB_TOKEN }}
41
+ repository : ${{ github.repository }}
You can’t perform that action at this time.
0 commit comments