Skip to content

Commit

Permalink
improve deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto committed Dec 3, 2018
1 parent d772571 commit b73b02b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
.DS_Store
_site
16 changes: 16 additions & 0 deletions config/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

if [ `git branch --list gh-pages` ]
then
git branch -D gh-pages
git checkout -b gh-pages
else
git checkout -b gh-pages
fi
rm -f .gitignore
npm run build
git add _site
git commit -m 'Update Website'
git push upstream `git subtree split --prefix _site gh-pages`:gh-pages -f
git checkout -f
git checkout master
7 changes: 0 additions & 7 deletions deploy.sh

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "A list of helpful front-end related questions you can use to interview potential candidates, test yourself or completely ignore.",
"scripts": {
"build": "eleventy --config=config/eleventy.config.js --pathprefix='Front-end-Developer-Interview-Questions/'",
"deploy": "git subtree push --prefix _site git@github.com:h5bp/Front-end-Developer-Interview-Questions.git gh-pages",
"deploy": "sh ./config/deploy.sh",
"contributors:add": "all-contributors add",
"contributors:generate": "all-contributors generate",
"start": "eleventy --config=config/eleventy.config.js --serve --port 9090 --quiet"
Expand Down

0 comments on commit b73b02b

Please sign in to comment.