Use only one build job

Having build and test jobs is too slow
This commit is contained in:
curben 2018-09-26 20:50:21 +09:30
parent 7953a0f16b
commit 0f58cc00fd
2 changed files with 15 additions and 26 deletions

View File

@ -1,34 +1,20 @@
# Use latest version of Node.js
image: node:latest
image: node:latest # Use latest version of Node.js
stages:
- test
- deploy
pages:
cache: # add cache to 'node_modules' for speeding up builds
paths:
- node_modules/ # Node modules and dependencies
cache: # add cache to 'node_modules' for speeding up builds
paths:
- node_modules/ # Node modules and dependencies
snyk-test:
stage: test
script:
- npm install -g snyk hexo-cli
- npm install # install node modules
- npm install -g snyk
- snyk auth $SNYK_TOKEN
- snyk protect # Apply patches to node modules
- snyk test # Check node modules for vulnerability
only:
- master
pages:
stage: deploy
script:
- npm install -g hexo-cli
- hexo deploy # deploy the site
- find public -type f -iregex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -execdir gzip -f --keep {} \; # Compress files
artifacts:
paths:
- public # deploy to the 'public' folder
only:
- master
when: on_success
- master # this job will affect only the 'master' branch

View File

@ -551,7 +551,7 @@ blockquote{
line-height:1;
text-align:left;
font-size:1em;
padding-top:50px;
padding-top:3em;
max-width:700px
}
.archive-container article,.category-container article,.tag-container article{
@ -902,6 +902,9 @@ pre .javascript .function,pre .keyword{
.archive-container,.archive-footer,.article,.home .content,.post-footer{
width:80%
}
.archive-container,.category-container,.tag-container{
padding-top:1em;
}
.article-title{
font-size:1.8rem
}
@ -932,7 +935,7 @@ pre .javascript .function,pre .keyword{
color:$111
}
.archive-container .archive-footer,.archive-container .post-footer{
padding:40px
padding:1em
}
.archive-container .archive-article-header>a,.archive-container .archive-article-header>h1{
width:100%
@ -971,13 +974,13 @@ pre .javascript .function,pre .keyword{
}
@media (max-width:320px){
body{
font-size:14px
font-size:0.9em
}
.article{
font-size:16px
font-size:1em
}
.archive-container .archive-footer,.archive-container .post-footer{
padding:30px
padding:1em
}
.footer,.footer-content{
font-size:0.9em