Skip to content

Commit

Permalink
Move deploy procedure to .travis/deploy.sh. Remove the old theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy351 committed Jul 22, 2015
1 parent 6263d69 commit 051d34e
Show file tree
Hide file tree
Showing 47 changed files with 34 additions and 1,391 deletions.
31 changes: 7 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,16 @@ addons:
apt:
packages:
- graphicsmagick

before_install:
# Decrypt the private key
- openssl aes-256-cbc -K $encrypted_06b8e90ac19b_key -iv $encrypted_06b8e90ac19b_iv -in .travis/ssh_key.enc -out ~/.ssh/id_rsa -d
# Set the permission of the key
- chmod 600 ~/.ssh/id_rsa
# Start SSH agent
- eval $(ssh-agent)
# Add the private key to the system
- ssh-add ~/.ssh/id_rsa
# Copy SSH config
- cp .travis/ssh_config ~/.ssh/config
# Set Git config
- git config --global user.name "Tommy Chen"
- git config --global user.email [email protected]
# Clone the repository
- git clone https://github.com/hexojs/hexojs.github.io .deploy_git
ssh_known_hosts: github.com

install:
# Install Hexo
- npm install hexo-cli -g
# Install dependencies
- npm install --no-optional

script:
- hexo generate && gulp && hexo deploy
- npm run build

branches:
only:
- master
deploy:
provider: script
script: .travis/deploy.sh
on:
branch: master
17 changes: 17 additions & 0 deletions .travis/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Decrypt the private key
openssl aes-256-cbc -K $encrypted_06b8e90ac19b_key -iv $encrypted_06b8e90ac19b_iv -in .travis/ssh_key.enc -out ~/.ssh/id_rsa -d
# Set the permission of the key
chmod 600 ~/.ssh/id_rsa
# Start SSH agent
eval $(ssh-agent)
# Add the private key to the system
ssh-add ~/.ssh/id_rsa
# Copy SSH config
cp .travis/ssh_config ~/.ssh/config
# Set Git config
git config --global user.name "Tommy Chen"
git config --global user.email [email protected]
# Clone the repository
git clone https://github.com/hexojs/hexojs.github.io .deploy_git
# Deploy
hexo deploy
6 changes: 2 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var autoprefixer = require('autoprefixer-core');
var cssnano = require('cssnano');

var htmlMinifierOptions = {
removeComments: true,
Expand All @@ -28,9 +28,7 @@ gulp.task('useref', function(){
return gulp.src('public/**/*.html')
.pipe(assets)
.pipe($.if('*.css', $.postcss([
autoprefixer({
browsers: ['last 2 versions', 'Firefox ESR']
})
cssnano()
])))
.pipe($.if('*.css', $.minifyCss()))
.pipe($.if('*.js', $.uglify()))
Expand Down
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
"version": "0.0.0",
"private": true,
"hexo": {
"version": "3.0.1"
"version": "3.1.1"
},
"scripts": {
"build": "hexo generate && gulp"
},
"dependencies": {
"cheerio": "^0.18.0",
"hexo": "^3.0.0",
"hexo-deployer-git": "0.0.3",
"hexo-generator-archive": "0.0.2",
"hexo": "^3.1.1",
"hexo-deployer-git": "0.0.4",
"hexo-generator-archive": "^0.1.3",
"hexo-generator-feed": "^1.0.0",
"hexo-generator-sitemap": "^1.0.0",
"hexo-renderer-ejs": "^0.1.0",
"hexo-renderer-jade": "^0.1.0",
"hexo-renderer-marked": "^0.2.3",
"hexo-renderer-stylus": "^0.2.0",
Expand All @@ -21,7 +23,7 @@
"lunr": "^0.5.7"
},
"devDependencies": {
"autoprefixer-core": "^5.1.7",
"cssnano": "^2.1.0",
"gulp": "^3.8.11",
"gulp-html-minifier": "^0.1.6",
"gulp-if": "^1.2.5",
Expand Down
39 changes: 0 additions & 39 deletions themes/hexo3/_config.yml

This file was deleted.

39 changes: 0 additions & 39 deletions themes/hexo3/languages/en.yml

This file was deleted.

39 changes: 0 additions & 39 deletions themes/hexo3/languages/zh-tw.yml

This file was deleted.

35 changes: 0 additions & 35 deletions themes/hexo3/layout/_partial/after-footer.ejs

This file was deleted.

17 changes: 0 additions & 17 deletions themes/hexo3/layout/_partial/article.ejs

This file was deleted.

5 changes: 0 additions & 5 deletions themes/hexo3/layout/_partial/comment.ejs

This file was deleted.

14 changes: 0 additions & 14 deletions themes/hexo3/layout/_partial/footer.ejs

This file was deleted.

11 changes: 0 additions & 11 deletions themes/hexo3/layout/_partial/google-analytics.ejs

This file was deleted.

33 changes: 0 additions & 33 deletions themes/hexo3/layout/_partial/head.ejs

This file was deleted.

17 changes: 0 additions & 17 deletions themes/hexo3/layout/_partial/header.ejs

This file was deleted.

8 changes: 0 additions & 8 deletions themes/hexo3/layout/_partial/news-banner.ejs

This file was deleted.

Loading

0 comments on commit 051d34e

Please sign in to comment.