From 58dc360573d44b4255aeca93ca8bbfbea20be3fb Mon Sep 17 00:00:00 2001 From: Joshua Seigler Date: Sun, 8 Mar 2020 21:38:27 -0400 Subject: [PATCH] chore: add npm script for deploying gh-pages --- .gitignore | 6 ++++-- README.md | 9 ++++++--- package-lock.json | 24 ++++++++++++++++++++++++ package.json | 16 +++++++++------- 4 files changed, 43 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index c9e489c..e934ef8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,9 @@ Thumbs.db .npm .vscode -node_modules +node_modules/ npm-debug.log* -logs +logs/ *.log + +build/ \ No newline at end of file diff --git a/README.md b/README.md index a61e29a..98f6f09 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,12 @@ npm run production-win The site is built in the `/build` folder. +To deploy the contents of the `/build` folder to Github Pages, run the appropriate production build command, then: + +```bash +npm run deploy +``` + ## Further information The [built site](https://rawgit.com/dashdev-suite/dashdev-website/master/build/) provides further information about site files and settings. - - - diff --git a/package-lock.json b/package-lock.json index 6cc86ed..606eb6a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1903,6 +1903,30 @@ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", "dev": true }, + "git-directory-deploy": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/git-directory-deploy/-/git-directory-deploy-1.5.1.tgz", + "integrity": "sha1-xPrYwnDWeNXzCfvd6sHtpgytf9I=", + "dev": true, + "requires": { + "lodash": "^4.14.2", + "minimist": "^1.1.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", diff --git a/package.json b/package.json index b2a4dbc..9639ca7 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "start": "node ./build.js", "production": "NODE_ENV=production node ./build.js", "production-win": "set NODE_ENV=production & node ./build.js", + "deploy": "git-directory-deploy --directory build/", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { @@ -21,24 +22,25 @@ }, "homepage": "https://github.com/dashdev-suite/dashdev-website#readme", "devDependencies": { + "git-directory-deploy": "^1.5.1", "handlebars": "^4.7.3", + "jstransformer-handlebars": "^1.1.0", + "jstransformer-markdown": "^1.2.1", "metalsmith": "^2.3.0", "metalsmith-assets": "^0.1.0", "metalsmith-browser-sync": "^1.1.1", "metalsmith-collections": "^0.9.0", + "metalsmith-discover-partials": "^0.1.2", "metalsmith-feed": "^1.0.0", "metalsmith-html-minifier": "^4.0.1", "metalsmith-layouts": "^2.3.1", "metalsmith-markdown": "^1.3.0", - "metalsmith-permalinks": "^2.2.0", - "metalsmith-publish": "^0.1.5", - "metalsmith-word-count": "0.0.4", - "jstransformer-handlebars": "^1.1.0", - "jstransformer-markdown": "^1.2.1", - "metalsmith-discover-partials": "^0.1.2", "metalsmith-markdown-precompiler": "^1.0.0", "metalsmith-paths": "^3.0.1", - "metalsmith-sitemap": "^1.2.2" + "metalsmith-permalinks": "^2.2.0", + "metalsmith-publish": "^0.1.5", + "metalsmith-sitemap": "^1.2.2", + "metalsmith-word-count": "0.0.4" }, "dependencies": {} }