Hi.
Can I build and deploy at different jobs?
I want to build at nodejs image and deploy it at python image.
I build it, but deploy job has no build files.
version: 2
jobs:
build:
docker:
- image: circleci/node:8
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run:
name: npm install
command: |
npm install
- run:
name: build
command: |
npm run build:dev2
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
deploy: # @see https://circleci.com/docs/2.0/deployment-integrations/#aws
docker:
- image: circleci/python:2.7-jessie
working_directory: ~/repo
# working_directory: ~/circleci-docs
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run:
name: Install awscli
command: sudo pip install awscli
- run:
name: Deploy to S3
command: bash bin/deploy.sh
workflows:
version: 2
deploy-master:
jobs:
- build
# - deploy
- deploy:
requires: # stop when build fails
- build
Thanks!