mirror of
https://github.com/ascribe/wp-theme
synced 2024-12-23 01:30:09 +01:00
Travis setup
This commit is contained in:
parent
fe48760403
commit
3119d6a2ed
23
.travis.yml
Normal file
23
.travis.yml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
sudo: required
|
||||||
|
dist: trusty
|
||||||
|
|
||||||
|
language: node_js
|
||||||
|
node_js:
|
||||||
|
- "6"
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- node_modules
|
||||||
|
|
||||||
|
before_script: "_ci/setup.sh"
|
||||||
|
script: "_ci/build.sh"
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
skip_cleanup: true
|
||||||
|
provider: script
|
||||||
|
script: "_ci/deploy.sh"
|
||||||
|
on:
|
||||||
|
branch: master
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email: false
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
> WordPress theme for ascribe's landing page and blog
|
> WordPress theme for ascribe's landing page and blog
|
||||||
|
|
||||||
[ ![Codeship Status for ascribe/wp-theme](https://codeship.com/projects/33c7d280-cf2d-0133-1c09-5ed74b30bb55/status?branch=master)](https://codeship.com/projects/141150)
|
[![Build Status](https://travis-ci.com/ascribe/wp-theme.svg?token=3psqw6c8KMDqfdGQ2x6d&branch=master)](https://travis-ci.com/ascribe/wp-theme)
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ gulp build
|
|||||||
|
|
||||||
## Deployment: Continuous Delivery
|
## Deployment: Continuous Delivery
|
||||||
|
|
||||||
The theme under `ascribe/` gets built & deployed automatically via Codeship under the following conditions:
|
The theme under `ascribe/` gets built & deployed automatically via Travis under the following conditions:
|
||||||
|
|
||||||
- every push builds the site
|
- every push builds the site
|
||||||
- every push to the master branch initiates a live deployment
|
- every push to the master branch initiates a live deployment
|
||||||
|
12
_ci/build.sh
12
_ci/build.sh
@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
set -e;
|
set -e;
|
||||||
|
|
||||||
|
echo "$(tput setaf 136)"
|
||||||
|
echo "============================================="
|
||||||
|
echo " Starting build "
|
||||||
|
echo "============================================="
|
||||||
|
echo "$(tput sgr0)" # reset
|
||||||
|
|
||||||
gulp build
|
gulp build
|
||||||
|
|
||||||
|
echo "$(tput setaf 64)" # green
|
||||||
|
echo "---------------------------------------------"
|
||||||
|
echo " ✓ done building"
|
||||||
|
echo "---------------------------------------------"
|
||||||
|
echo "$(tput sgr0)" # reset
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
@ -4,8 +4,18 @@
|
|||||||
|
|
||||||
set -e;
|
set -e;
|
||||||
|
|
||||||
if [ $CI_BRANCH == "master" ]; then
|
echo "$(tput setaf 136)"
|
||||||
rsync --recursive --delete --delete-excluded --checksum --verbose -e "ssh" $DEPLOY_SRC $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH
|
echo "============================================="
|
||||||
fi;
|
echo " Start deployment: live "
|
||||||
|
echo "============================================="
|
||||||
|
echo "$(tput sgr0)" # reset
|
||||||
|
|
||||||
|
rsync --recursive --delete --delete-excluded --checksum --verbose -e "ssh" $DEPLOY_SRC $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH
|
||||||
|
|
||||||
|
echo "$(tput setaf 64)" # green
|
||||||
|
echo "---------------------------------------------"
|
||||||
|
echo " ✓ done deployment: live"
|
||||||
|
echo "---------------------------------------------"
|
||||||
|
echo "$(tput sgr0)" # reset
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
12
_ci/setup.sh
12
_ci/setup.sh
@ -2,7 +2,19 @@
|
|||||||
|
|
||||||
set -e;
|
set -e;
|
||||||
|
|
||||||
|
echo "$(tput setaf 136)"
|
||||||
|
echo "============================================="
|
||||||
|
echo " Installing dependencies "
|
||||||
|
echo "============================================="
|
||||||
|
echo "$(tput sgr0)" # reset
|
||||||
|
|
||||||
npm install gulp -g
|
npm install gulp -g
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
|
echo "$(tput setaf 64)" # green
|
||||||
|
echo "---------------------------------------------"
|
||||||
|
echo " ✓ done installing dependencies"
|
||||||
|
echo "---------------------------------------------"
|
||||||
|
echo "$(tput sgr0)" # reset
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user