Browse Source

update config.yml

main
khelia 5 years ago
parent
commit
2299ebb528
  1. 44
      .circleci/config.yml

44
.circleci/config.yml

@ -20,6 +20,16 @@ workflows:
branches:
only:
- main
- netlify_build:
requires:
- build
- netlify_deploy:
requires:
- netlify_build
filters:
branches:
only:
- main
- build_docs_artifact:
requires:
- test
@ -80,6 +90,40 @@ jobs:
docker tag $IMAGE_NAME:app $IMAGE_NAME:latest
docker push $IMAGE_NAME:$CIRCLE_BUILD_NUM
docker push $IMAGE_NAME:latest
netlify_build:
docker:
- image: circleci/buildpack-deps:stretch
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "package.json" }}-{{ .Environment.CACHE_VERSION }}
- run: npm install
- run: npm run build
- run:
name: Copy build to workspace
command: |
cp dist/ /tmp/dist -r
- store_artifacts:
path: /tmp/dist
- persist_to_workspace:
root: /tmp
paths:
- dist
netlify_deploy:
docker:
- image: circleci/buildpack-deps:stretch
working_directory: ~/my-awesome-project
steps:
- attach_workspace:
at: /tmp
- run:
name: Deploy app
command: |
ls -al /tmp
sudo npm install -g --silent netlify-cli
netlify deploy --prod --auth $NETLIFY_AUTH_TOKEN --dir=/tmp/dist --site $SITEID
build_docs_artifact:
docker:
- image: cimg/node:12.18.4

Loading…
Cancel
Save