language: node_js
node_js:
  - "node"

branches:
  only:
  - master

before_install:
- npm install -g hexo
- npm install

install:
  # `awscli` is required for invalidation of CloudFront distributions.
  - pip install awscli

script:
  # Site build processes
  - gulp scss
  - hexo generate
  - gulp beautify

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:
  # Allow `awscli` to make requests to CloudFront.
  - aws configure set preview.cloudfront true
  # Invalidate every object in the targeted distribution.
  - aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"

language: python
python: "3.6.4"

branches:
  only:
  - master

before_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

install:
  - npm install -g hexo
  - npm install
  - pip3 install awscli

script:
  - gulp scss
  - hexo generate
  - gulp beautify

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 "/*"

Use python and node together
Use python and node together
