Files
LingvAI/.travis.yml
David 15f440e698 Docker image autodeploy using Travis (#47)
* Docker travis initial test

* Added build command

* Final version
2021-09-05 17:21:51 +02:00

47 lines
695 B
YAML

language: node_js
node_js:
- lts/*
os: linux
dist: xenial
services:
- docker
addons:
apt:
packages:
- libgconf-2-4
cache:
yarn: true
directories:
- ~/.cache
branches:
only:
- main
script:
- yarn test --ci
- yarn build
- yarn start & wait-on http://localhost:3000
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ];
then
yarn cy:run --record --key $CY_KEY;
else
yarn cy:run;
fi'
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t thedaviddelta/lingva-translate .
deploy:
provider: script
script: docker push thedaviddelta/lingva-translate
on:
branch: main