summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorJordan Gong <jordan@xps-15-9570.localdomain>2020-08-07 16:58:02 +0800
committerJordan Gong <jordan@xps-15-9570.localdomain>2020-08-07 16:58:02 +0800
commita4e6edc7d60d91d47f46e34b2256ea4f4ec9b2c4 (patch)
tree01a696c09634610ffdde5cdf00e02c2c92616088 /.travis.yml
parent4aaa4f52f8cab945926aba40a0477490be76bd3c (diff)
Add Travis CI config
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..650d10d
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,19 @@
+language: minimal
+
+before_script:
+ # Download and unzip the zola executable
+ # Replace the version numbers in the URL by the version you want to use
+ - curl -s -L https://github.com/getzola/zola/releases/download/v0.9.0/zola-v0.9.0-x86_64-unknown-linux-gnu.tar.gz | sudo tar xvzf - -C /usr/local/bin
+
+script:
+ - zola build
+
+# If you are using a different folder than `public` for the output directory, you will
+# need to change the `zola` command and the `ghp-import` path
+after_success: |
+ [ $TRAVIS_BRANCH = code ] &&
+ [ $TRAVIS_PULL_REQUEST = false ] &&
+ zola build &&
+ sudo pip install ghp-import &&
+ ghp-import -c blog.jordangong.com -n public -b master &&
+ git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git master