branches:
  only:
  - master

language: python
python: "3.7"

install:
  - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install node
  - npm install -g hexo gulp
  - npm install
  - pip3 install awscli

script:
  - gulp sass
  - hexo generate
  - gulp prettify

deploy:
  provider: s3
  access_key_id: $AWS_ACCESS_KEY_ID
  secret_access_key: $AWS_SECRET_ACCESS_KEY
  bucket: "hisaac.net"
  skip_cleanup: true
  local_dir: public
  cache_control: "max-age=21600"

after_deploy:
  - aws configure set preview.cloudfront true
  - aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"

notifications:
  email:
    recipients: hello@hisaac.net
    on_success: always

branches:
  only:
  - master

language: python
python: "3.6"

install:
  - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install node
  - npm install -g hexo gulp
  - npm install
  - pip3 install awscli

script:
  - gulp sass
  - hexo generate
  - gulp prettify

deploy:
  provider: s3
  access_key_id: $AWS_ACCESS_KEY_ID
  secret_access_key: $AWS_SECRET_ACCESS_KEY
  bucket: "hisaac.net"
  skip_cleanup: true
  local_dir: public
  cache_control: "max-age=21600"

after_deploy:
  - aws configure set preview.cloudfront true
  - aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"

notifications:
  email:
    recipients: hello@hisaac.net
    on_success: always

Set python version to 3.6
Set python version to 3.6
