Created
March 8, 2021 14:35
-
-
Save p0rsche/c1a5a67dbfdd9cfccd2333394407c356 to your computer and use it in GitHub Desktop.
circle build for node/yarn/eslint/webpack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2.1 | |
orbs: | |
aws-s3: circleci/[email protected] | |
node: circleci/[email protected] | |
workflows: | |
version: 2 | |
build_and_deploy: | |
jobs: | |
- build | |
- deploy: | |
requires: | |
- build | |
filters: | |
branches: | |
only: main | |
jobs: | |
build: | |
docker: | |
- image: cimg/node:lts | |
working_directory: ~/widget | |
steps: | |
- checkout | |
- node/install-packages: | |
app-dir: ~/widget | |
cache-path: node_modules | |
override-ci-command: npm i | |
- persist_to_workspace: | |
root: . | |
paths: | |
- . | |
- run: | |
command: npm run ci:build | |
deploy: | |
docker: | |
- image: cimg/node:lts | |
working_directory: ~/widget | |
steps: | |
- attach_workspace: | |
at: . | |
- run: | |
command: npm run compress | |
- aws-s3/sync: | |
arguments: | | |
--dryrun \ | |
--acl public-read \ | |
--cache-control "max-age=86400" | |
from: dist | |
to: s3://ohi-s3-bucket-name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment