-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: minor fixes and add travis ci
- Loading branch information
ppoffice
committed
Mar 12, 2020
1 parent
e4cdb01
commit a8b7dd6
Showing
4 changed files
with
69 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
language: node_js | ||
|
||
os: linux | ||
|
||
cache: false | ||
|
||
node_js: | ||
- "8" | ||
- "node" | ||
|
||
before_script: | ||
- export DEPS=$(node -e "const deps=require('./package.json').peerDependencies;console.log(Object.keys(deps).map(key=>key+'@'+deps[key]).join(' '));") | ||
- npm install $DEPS | ||
|
||
script: | ||
- echo "Running tests against $(node -v) ..." | ||
- npm run lint | ||
|
||
jobs: | ||
include: | ||
- stage: github pages | ||
node_js: "10" | ||
git: | ||
clone: false | ||
script: | ||
- echo "Publish site to github pages ..." | ||
- git clone --recurse-submodules https://github.com/ppoffice/hexo-theme-icarus.git -b site $TRAVIS_BUILD_DIR | ||
- cd $TRAVIS_BUILD_DIR/themes/icarus | ||
- git fetch origin $TRAVIS_COMMIT && git merge $TRAVIS_COMMIT | ||
- export DEPS=$(node -e "const deps=require('./package.json').peerDependencies;console.log(Object.keys(deps).map(key=>key+'@'+deps[key]).join(' '));") | ||
- cd $TRAVIS_BUILD_DIR | ||
- npm install -g hexo-cli | ||
- npm install | ||
- npm install $DEPS | ||
- cp _config.theme.yml themes/icarus/_config.yml | ||
- hexo g | ||
deploy: | ||
provider: pages | ||
token: $GITHUB_TOKEN | ||
keep_history: false | ||
local_dir: public | ||
skip_cleanup: true | ||
on: | ||
tags: true | ||
|
||
- stage: github release | ||
node_js: "10" | ||
script: echo "Deploying to github release ..." | ||
deploy: | ||
provider: releases | ||
token: $GITHUB_TOKEN | ||
on: | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,7 @@ | |
"author": "ppoffice <[email protected]>", | ||
"license": "MIT", | ||
"scripts": { | ||
"lint": "eslint --ext .js --ext .jsx --ext .json .", | ||
"postpublish": "PACKAGE_VERSION=$(cat package.json | grep \\\"version\\\" | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag $PACKAGE_VERSION && git push --tags" | ||
"lint": "eslint --ext .js --ext .jsx --ext .json ." | ||
}, | ||
"devDependencies": { | ||
"eslint": "^6.8.0", | ||
|