Skip to content

Instantly share code, notes, and snippets.

@gcdd1993
Created January 24, 2019 10:00
Show Gist options
  • Save gcdd1993/f6730e02d604d4a688605533c4f88b63 to your computer and use it in GitHub Desktop.
Save gcdd1993/f6730e02d604d4a688605533c4f88b63 to your computer and use it in GitHub Desktop.
Travis-CI持续集成示例脚本(用于Hexo自动化发布)
language: node_js
sudo: required
dist: xenial
node_js: stable
branches:
only:
- master
cache:
directories:
- node_modules
before_install:
- export TZ='Asia/Shanghai'
- npm install hexo-cli -g
- sudo apt-get install libpng16-dev
install:
- npm install
script:
- hexo clean
- hexo g
- sed -i "s/GH_TOKEN/${GH_TOKEN}/g" ./_config.yml
- hexo d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment