|
|
|
@ -34,7 +34,7 @@ jobs: |
|
|
|
root: /tmp |
|
|
|
paths: |
|
|
|
- dist |
|
|
|
front-deploy: |
|
|
|
fondend-deploy: |
|
|
|
docker: |
|
|
|
- image: circleci/node:dubnium-browsers |
|
|
|
working_directory: ~/dist |
|
|
|
@ -45,6 +45,24 @@ jobs: |
|
|
|
name: Deploy app |
|
|
|
command: | |
|
|
|
npx netlify-cli deploy --site $NETLIFY_SITE_ID --auth $NETLIFY_ACCESS_TOKEN --dir /tmp/dist --prod |
|
|
|
docker-buildandpush: |
|
|
|
docker: |
|
|
|
- image: docker:17.05.0-ce-git |
|
|
|
steps: |
|
|
|
- checkout |
|
|
|
- setup_remote_docker |
|
|
|
- run: |
|
|
|
name: Build application Docker image |
|
|
|
command: | |
|
|
|
docker build --cache-from=app -t app . |
|
|
|
- deploy: |
|
|
|
name: Publish application to docker hub |
|
|
|
command: | |
|
|
|
docker login -e sipetchawoudanieljordan@yahoo.fr -u sipedaniel -p $DOCKER_HUB_PASSWORD |
|
|
|
docker tag app sipedaniel/frontend-finalproject:$CIRCLE_BUILD_NUM |
|
|
|
docker tag app sipedaniel/frontend-finalproject:latest |
|
|
|
docker push sipedaniel/frontend-finalproject:$CIRCLE_BUILD_NUM |
|
|
|
docker push sipedaniel/frontend-finalproject:latest |
|
|
|
workflows: |
|
|
|
version: 2.1 |
|
|
|
build-deploy_frontend: |
|
|
|
@ -53,6 +71,9 @@ workflows: |
|
|
|
- build: |
|
|
|
requires: |
|
|
|
- install-dependencies |
|
|
|
- front-deploy: |
|
|
|
- fondend-deploy: |
|
|
|
requires: |
|
|
|
- build |
|
|
|
- docker-buildandpush: |
|
|
|
requires: |
|
|
|
- build |