diff --git a/appveyor.yml b/appveyor.yml index 879c14fe..14a719b0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -16,6 +16,14 @@ init: install: - gem install jekyll bundler +- sh: | + if [ "${GH_TOKEN}" != "" ] + then + git config --global credential.helper store + echo "https://${GH_TOKEN}:x-oauth-basic@github.com" >> ~/.git-credentials + git config --global user.email "ci@bitwarden.com" + git config --global user.name "Bitwarden CI" + fi before_build: - node --version @@ -25,7 +33,13 @@ before_build: build_script: - npm install -- npm run deploy:ci +- sh: | + if [ "${GH_TOKEN}" != "" ] + then + npm run deploy:ci + else + npm run build + fi on_finish: - sh: | diff --git a/package.json b/package.json index 027ff8de..2089607f 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,7 @@ "scripts": { "build": "gulp build && jekyll build", "build:watch": "gulp build && jekyll serve --watch --host=0.0.0.0", - "deploy": "npm run build && gh-pages --dotfiles --dist _site", - "deploy:ci": "npm run build && gh-pages --dotfiles --dist _site --silent --repo \"https://${GH_TOKEN}@github.com/bitwarden/help.git\"" + "deploy": "npm run build && gh-pages --dotfiles --dist _site" }, "devDependencies": { "bootstrap-sass": "3.3.7",