language: node_js
dist: buster
node_js: '10'
sudo: required
cache:
  directories:
    - node_modules
install:
  - sudo apt-get install git
  - npm install
before_script:
  - mkdir -p static/crawled/
  - npm run crawl
script:
  - ./bin/test.sh
before_deploy:
  - mv static/crawled/ /tmp/crawled/
  - npm run build
  - mv dist/ /tmp/dist/
  - openssl des3 -d -in pitskulounas.crypted -out /tmp/deploy_key -k $PRIVATE_KEY_PASSWORD;
  - chmod 0600 /tmp/deploy_key
  - eval `ssh-agent -s`
  - ssh-add /tmp/deploy_key
  - chmod 775 ./bin/deploy.sh
deploy:
  skip_cleanup: true
  provider: script
  script: ./bin/deploy.sh
  on:
    branch: master
after_deploy:
  - shred /tmp/deploy_key

language: node_js
dist: buster
node_js: '12'
sudo: required
cache:
  directories:
    - node_modules
install:
  - sudo apt-get install git
  - npm install
before_script:
  - mkdir -p static/crawled/
  - npm run crawl
script:
  - ./bin/test.sh
before_deploy:
  - mv static/crawled/ /tmp/crawled/
  - npm run build
  - mv dist/ /tmp/dist/
  - openssl des3 -d -in pitskulounas.crypted -out /tmp/deploy_key -k $PRIVATE_KEY_PASSWORD;
  - chmod 0600 /tmp/deploy_key
  - eval `ssh-agent -s`
  - ssh-add /tmp/deploy_key
  - chmod 775 ./bin/deploy.sh
deploy:
  skip_cleanup: true
  provider: script
  script: ./bin/deploy.sh
  on:
    branch: master
after_deploy:
  - shred /tmp/deploy_key

Swap to node 12 build again
Swap to node 12 build again
