forked from decentraland/marketplace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feat: CircleCI Deploy YAML * Adding public to gitignore * Testing DEV before moving on * Testing circle * Fixing typo * Testing the right env * Final env testing * Ready to rumble
- Loading branch information
Miguel Gagliardo
authored
Feb 17, 2020
1 parent
ea6c98e
commit 6dd585c
Showing
2 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/node:10-browsers | ||
working_directory: /tmp/market | ||
steps: | ||
- checkout | ||
- run: | ||
name: Run NPM | ||
command: | | ||
npm i && \ | ||
npm run build | ||
- save_cache: | ||
name: Save the built files | ||
paths: | ||
- public | ||
key: build-{{ .Revision }} | ||
|
||
deploy: | ||
docker: | ||
- image: circleci/node:10-browsers | ||
working_directory: /tmp/market | ||
steps: | ||
- restore_cache: | ||
name: Restore built files | ||
keys: | ||
- build-{{ .Revision }} | ||
- run: sudo apt-get -y -qq install awscli curl | ||
- run: | ||
name: Configure AWS Keys | ||
command: | | ||
aws configure set aws_access_key_id ${AWS_ACCESS_KEY_ID} && aws configure set aws_secret_access_key ${AWS_SECRET_ACCESS_KEY} | ||
- run: | ||
name: Deploy to S3 | ||
command: cd public && aws s3 sync . s3://${S3_BUCKET}/ | ||
- run: | ||
name: Invalidate cloudflare cache | ||
command: curl --silent ${PURGE_CACHE_URL} | ||
|
||
workflows: | ||
version: 2 | ||
build-deploy-dev: | ||
jobs: | ||
- build: | ||
context: market-dev | ||
filters: | ||
branches: | ||
only: master | ||
- deploy: | ||
context: market-dev | ||
requires: | ||
- build | ||
filters: | ||
branches: | ||
only: master | ||
build-deploy-stg: | ||
jobs: | ||
- build: | ||
context: market-stg | ||
filters: | ||
branches: | ||
only: staging | ||
- deploy: | ||
context: market-stg | ||
requires: | ||
- build | ||
filters: | ||
branches: | ||
only: staging | ||
build-deploy-release-org: | ||
jobs: | ||
- build: | ||
context: market-prd | ||
filters: | ||
branches: | ||
only: release | ||
- deploy: | ||
context: market-prd | ||
requires: | ||
- build | ||
filters: | ||
branches: | ||
only: release | ||
build-branch: | ||
jobs: | ||
- build: | ||
filters: | ||
branches: | ||
ignore: | ||
- master | ||
- release | ||
- staging |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ typings/ | |
|
||
# Built files | ||
dist | ||
public | ||
|
||
# Indexer generated data | ||
indexer/build | ||
|