-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
36 lines (31 loc) · 976 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
image: node:latest
services:
- mysql:5.7
cache:
paths:
- node_modules/
variables:
# Configure mysql environment variables (https://hub.docker.com/_/mysql/)
MYSQL_ROOT_PASSWORD: root_password
test:
script:
- npm install
- npm run test
pages:
before_script:
- apt-get update -y -qq
- apt-get install -y -qq --no-install-recommends default-mysql-client
script:
- mysql --user=root --password="root_password" --host=mysql --execute "CREATE DATABASE banned_history CHARACTER SET utf8 COLLATE utf8_general_ci;"
- cp -r ./node_modules/pdfjs-dist ./public/
- CI=true npm run init-db
- SITE_URL='https://banned-historical-archives.gitlab.io' CI=true npm run build
- mv out/BingSiteAuth.gitlab.xml out/BingSiteAuth.xml
- mv out/googlefd23833910da97f2.gitlab.html out/googlefd23833910da97f2.html
- rm -rf public
- mv out public
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == "master"