26
26
- name : Install dependencies and regenerate package-lock.json
27
27
run : npm install
28
28
- name : Clean install on CI
29
- run : npm ci
29
+ run : |
30
+ if [ -e yarn.lock ]; then
31
+ yarn install --frozen-lockfile
32
+ elif [ -e package-lock.json ]; then
33
+ npm ci
34
+ else
35
+ npm i
36
+ fi
30
37
- name : Linter code check
31
38
run : npm run lint:check
32
39
- name : Testing JEST
@@ -49,20 +56,27 @@ jobs:
49
56
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
50
57
shell : bash
51
58
- name : Clean install on CI
52
- run : npm ci
59
+ run : |
60
+ if [ -e yarn.lock ]; then
61
+ yarn install --frozen-lockfile
62
+ elif [ -e package-lock.json ]; then
63
+ npm ci
64
+ else
65
+ npm i
66
+ fi
53
67
- name : Build library
54
68
run : npm run build
55
69
- name : Release version
56
70
run : npx semantic-release@18
57
71
env :
58
72
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
59
73
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
60
-
74
+
61
75
build-pages :
62
76
name : Build to GitHub Pages
63
77
needs : release
64
78
runs-on : ubuntu-latest
65
- env :
79
+ env :
66
80
VITE_REACT_DEPLOY_DOCUMENTATION : DOCUMENTATION
67
81
68
82
steps :
82
96
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
83
97
shell : bash
84
98
- name : Clean install on CI
85
- run : npm ci
99
+ run : |
100
+ if [ -e yarn.lock ]; then
101
+ yarn install --frozen-lockfile
102
+ elif [ -e package-lock.json ]; then
103
+ npm ci
104
+ else
105
+ npm i
106
+ fi
86
107
- name : Generate new Build to Pages
87
108
run : npm run build
88
109
- name : Upload deploy-ready build files
@@ -92,61 +113,75 @@ jobs:
92
113
path : ./dist
93
114
94
115
deploy-pages :
95
- name : Deploy GitHub Pages
96
- needs : build-pages
97
- runs-on : ubuntu-latest
98
- if : github.ref == 'refs/heads/main'
116
+ name : Deploy GitHub Pages
117
+ needs : build-pages
118
+ runs-on : ubuntu-latest
119
+ if : github.ref == 'refs/heads/main'
99
120
100
- env :
101
- VITE_REACT_DEPLOY_DOCUMENTATION : DOCUMENTATION
121
+ env :
122
+ VITE_REACT_DEPLOY_DOCUMENTATION : DOCUMENTATION
102
123
103
- steps :
104
- - name : Download artifact
105
- uses : actions/download-artifact@v3
106
- with :
107
- name : deploy-files
108
- path : ./dist
124
+ steps :
125
+ - name : Download artifact
126
+ uses : actions/download-artifact@v3
127
+ with :
128
+ name : deploy-files
129
+ path : ./dist
109
130
110
- # - uses: actions/checkout@v3
111
- # - uses: actions/setup-node@v3
112
- # with:
113
- # node-version: 14.21.3
114
- # cache: 'npm'
115
- # - uses: webfactory/ssh-agent@v0.7.0
116
- # with:
117
- # ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
118
- # - name: Add Know Hosts
119
- # run: |
120
- # ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
121
- # shell: bash
122
- # - name: Clean install on CI
123
- # run: npm ci
124
- # - name: Generate new Build to Pages
125
- # run: npm run build
126
- # - name: Download artifact
127
- # uses: actions/download-artifact@v3
128
- # with:
129
- # name:
130
- # - name: Setup Node
131
- # - uses: actions/checkout@v3
132
- # - uses: actions/setup-node@v3
133
- # with:
134
- # node-version: 14.21.3
135
- # cache: 'npm'
136
- - uses : webfactory/ssh-agent@v0.7.0
137
- with :
138
- ssh-private-key : ${{ secrets.SSH_PRIVATE_KEY }}
139
- - name : Add Know Hosts
140
- run : |
141
- ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
142
- shell : bash
143
- # - name: Clean install on CI
144
- # run: npm ci
145
-
146
- - name : Deploy to GitHub Pages
147
- uses : peaceiris/actions-gh-pages@v3
148
- env :
149
- GH_TOKEN : eclass:${{ secrets.GITHUB_TOKEN }}
150
- with :
151
- github_token : ${{ secrets.GITHUB_TOKEN }}
152
- publish_dir : ./dist
131
+ # - uses: actions/checkout@v3
132
+ # - uses: actions/setup-node@v3
133
+ # with:
134
+ # node-version: 14.21.3
135
+ # cache: 'npm'
136
+ # - uses: webfactory/ssh-agent@v0.7.0
137
+ # with:
138
+ # ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
139
+ # - name: Add Know Hosts
140
+ # run: |
141
+ # ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
142
+ # shell: bash
143
+ # - name: Clean install on CI
144
+ # run: |
145
+ # if [ -e yarn.lock ]; then
146
+ # yarn install --frozen-lockfile
147
+ # elif [ -e package-lock.json ]; then
148
+ # npm ci
149
+ # else
150
+ # npm i
151
+ # fi
152
+ # - name: Generate new Build to Pages
153
+ # run: npm run build
154
+ # - name: Download artifact
155
+ # uses: actions/download-artifact@v3
156
+ # with:
157
+ # name:
158
+ # - name: Setup Node
159
+ # - uses: actions/checkout@v3
160
+ # - uses: actions/setup-node@v3
161
+ # with:
162
+ # node-version: 14.21.3
163
+ # cache: 'npm'
164
+ - uses : webfactory/ssh-agent@v0.7.0
165
+ with :
166
+ ssh-private-key : ${{ secrets.SSH_PRIVATE_KEY }}
167
+ - name : Add Know Hosts
168
+ run : |
169
+ ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
170
+ shell : bash
171
+ # - name: Clean install on CI
172
+ # run: |
173
+ # if [ -e yarn.lock ]; then
174
+ # yarn install --frozen-lockfile
175
+ # elif [ -e package-lock.json ]; then
176
+ # npm ci
177
+ # else
178
+ # npm i
179
+ # fi
180
+
181
+ - name : Deploy to GitHub Pages
182
+ uses : peaceiris/actions-gh-pages@v3
183
+ env :
184
+ GH_TOKEN : eclass:${{ secrets.GITHUB_TOKEN }}
185
+ with :
186
+ github_token : ${{ secrets.GITHUB_TOKEN }}
187
+ publish_dir : ./dist
0 commit comments