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

View File

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