Created
June 23, 2017 20:20
-
-
Save apowers313/04cb866def5bce6b54f73baed95609d0 to your computer and use it in GitHub Desktop.
Deploy Pull Requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Copyright 2016, W3C | |
set -ev | |
STATUS=`git log -1 --pretty=oneline` | |
# build output path | |
rm -rf "" out | |
OUTPUT_PATH=out | |
if [ "$TRAVIS_PULL_REQUEST" != "" ]; then | |
echo "Adding $TRAVIS_PULL_REQUEST to output path" | |
OUTPUT_PATH=$OUTPUT_PATH/${TRAVIS_PULL_REQUEST} | |
fi | |
if [ "$TRAVIS_BRANCH" != "" ]; then | |
echo "Adding $TRAVIS_BRANCH to output path" | |
OUTPUT_PATH=$OUTPUT_PATH/${TRAVIS_BRANCH} | |
fi | |
echo OUTPUT_PATH: ${OUTPUT_PATH} | |
git clone -b gh-pages --single-branch https://github.com/${TRAVIS_REPO_SLUG}.git out | |
mkdir -p ${OUTPUT_PATH} | |
cp fido-client-to-authenticator-protocol.html ./${OUTPUT_PATH}/index.html | |
#mkdir ./out/images | |
#cp images/* ./out/images | |
cd out | |
git config user.name "Travis-CI" | |
git config user.email "travis-ci" | |
ls | |
git add . | |
git commit -m "Built by Travis-CI: ${STATUS}" | |
git status | |
GH_REPO="@github.com/${TRAVIS_REPO_SLUG}.git" | |
FULL_REPO="https://${GH_TOKEN}${GH_REPO}" | |
git push --force --quiet $FULL_REPO master:gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2016, W3C | |
language: python | |
python: | |
- "2.7" | |
sudo: false | |
cache: pip | |
before_install: | |
- chmod 755 ./.deploy-output.sh | |
install: | |
- pip install --upgrade setuptools | |
- pip install pygments cssselect html5lib lxml | |
- git clone --depth=100 --branch=master https://github.com/tabatkins/bikeshed.git ./bikeshed | |
- pip install --editable ./bikeshed | |
# Use cached copy of bikeshed data files to give consistent builds | |
#- bikeshed update | |
#- cp -R .spec-data/* ./bikeshed/bikeshed/spec-data | |
#- cp -R .bikeshed-include/* ./bikeshed/bikeshed/include/biometrics-requirements | |
script: 'bikeshed spec' | |
after_success: | |
- '[ "${TRAVIS_BRANCH}" = "master" ] && ./.deploy-output.sh' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment