Permalink
Browse files

website: Use Hexo deploy vs bash script

  • Loading branch information...
1 parent 00ec15a commit 13fe74dbc218f28c21682e981ffef5e360d6342d @kvz committed May 3, 2016
Showing with 9 additions and 45 deletions.
  1. +1 −0 .gitignore
  2. +3 −2 CHANGELOG.md
  3. +1 −1 package.json
  4. +0 −41 scripts/deploy.sh
  5. +3 −1 website/_config.yml
  6. +1 −0 website/package.json
View
@@ -23,3 +23,4 @@ scripts/split-*.js
scripts/main.js.map
website/public
website/db.json
+website/.deploy_git
View
@@ -26,15 +26,16 @@ Ideas that will be planned and find their way into a release at one point
- [ ] Port a few more tricky/inter-depending Go functions
- [ ] Parse `require`s with AST just like Browserify does. Then we can add dependencies back to website
-## v2.0.2
+## v2.0.3
Released: Not yet
- [ ] Triage all open issues and PRs via waffle.io
-- [ ] Auto-deploys of `master` to http://locutusjs.io via Travis CI
- [ ] Address the 25 remaining test failures that are currently skipped (find out which ones via `npm run test:languages:noskip`)
- [ ] website: Add social buttons
- [ ] website: Render authors server-side
+- [ ] website: Auto-deploys of `master` to http://locutusjs.io via Travis CI
+- [x] website: Use Hexo deploy vs bash script
## v2.0.2
View
@@ -72,7 +72,7 @@
"test:module": "babel-node test/module/module.js",
"test:util": "mocha --compilers js:babel-register --reporter spec test/util/",
"test": "npm-run-all test:*",
- "website:deploy": "npm run website:inject && npm run website:build && scripts/deploy.sh",
+ "website:deploy": "npm run website:inject && npm run website:build && cd website && hexo deploy",
"website:inject": "rimraf website/source/{c,golang,php,python,ruby} && babel-node src/_util/cli.js injectweb",
"website:install": "cd website && npm install",
"website:start": "cd website && hexo server",
View
@@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-set -o pipefail
-set -o errexit
-set -o nounset
-# set -o xtrace
-
-# Set magic variables for current file & dir
-__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
-__base="$(basename ${__file} .sh)"
-__root="$(cd "$(dirname "${__dir}")" && pwd)"
-__webroot="${__root}/website"
-
-ghpages_repo=${GHPAGES_REPO:-"kvz/locutus"}
-ghpages_branch=${GHPAGES_BRANCH:-"gh-pages"}
-ghpages_url=${GHPAGES_URL:-"git@github.com:${ghpages_repo}.git"}
-
-echo "--> Deploying to GitHub pages.."
-mkdir -p /tmp/deploy-${ghpages_repo}
-
-# Custom steps
-rsync \
- --archive \
- --delete \
- --checksum \
- --no-times \
- --no-group \
- --no-motd \
- --no-owner \
-"${__webroot}/public/" /tmp/deploy-${ghpages_repo} > /dev/null
-
-echo 'This branch is just a deploy target. Do not edit. You changes will be lost.' \
- |tee /tmp/deploy-${ghpages_repo}/README.md
-
-(cd /tmp/deploy-${ghpages_repo} \
- && git init && git checkout -B ${ghpages_branch} && git add --all . \
- && git commit -nm "Update ${ghpages_repo} website by ${USER}" \
- && (git remote add origin ${ghpages_url}|| true) \
- && git push origin ${ghpages_branch}:refs/heads/${ghpages_branch} --force) > /dev/null
-
-rm -rf /tmp/deploy-${ghpages_repo}
View
@@ -89,4 +89,6 @@ theme: icarus
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
- type:
+ type: git
+ repo: git@github.com:kvz/locutus.git
+ branch: gh-pages
@@ -8,6 +8,7 @@
"dependencies": {
"hexo": "3.1.1",
"hexo-browsersync": "0.2.0",
+ "hexo-deployer-git": "0.1.0",
"hexo-front-matter-excerpt": "0.2.0",
"hexo-generator-alias": "0.1.3",
"hexo-generator-archive": "0.1.4",

0 comments on commit 13fe74d

Please sign in to comment.