First pass at automatic deployment

This commit is contained in:
Michael Droettboom 2018-06-19 13:36:14 -04:00
parent 178f860b30
commit 0b4e3cf3d7
2 changed files with 34 additions and 0 deletions

View File

@ -63,3 +63,24 @@ jobs:
command: |
export PATH=$PWD/firefox:$PATH
make test
deploy:
machine:
enabled: true
steps:
- run:
name: Deploy to Github Pages
command: |
.circleci/deploy.sh
workflows:
version: 2
build-and-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master

13
.circleci/deploy.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
set -x -e
git clone git@github.com:iodide-project/pyodide-demo
cp build/* pyodide-demo
cd pyodide-demo
git checkout --orphan tmp
git add *
git config --global user.email "deploybot@nowhere.com"
git config --global user.name "Deploybot"
git commit -m "Deployed from Circle-CI $CIRCLE_BUILD_NUM"
git checkout master
git reset --hard tmp
git push origin -f master