Skip to content

Commit

Permalink
Sync built docs in master to s3
Browse files Browse the repository at this point in the history
  • Loading branch information
bcardiff committed Apr 11, 2018
1 parent b1c30c2 commit 5633979
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .circleci/config.yml
Expand Up @@ -7,6 +7,10 @@ defaults:
- run: bin/ci prepare_system
- run: bin/ci prepare_build
- run: bin/ci build
- persist_to_workspace:
root: .
paths:
- docs

version: 2

Expand Down Expand Up @@ -37,6 +41,20 @@ jobs:
TRAVIS_OS_NAME: osx
steps: *ci_steps

sync_docs_s3:
machine: true
steps:
- attach_workspace:
at: /tmp/workspace
- run: |
echo $CIRCLE_SHA1 > /tmp/workspace/docs/revision.txt
- run: |
docker run -v /tmp/workspace/docs:/docs \
-e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \
-e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \
mesosphere/aws-cli \
s3 sync /docs/ s3://crystal-api/api/master --delete
prepare_common:
docker:
- image: docker:stable-git
Expand Down Expand Up @@ -243,7 +261,13 @@ workflows:
- test_linux
- test_linux32
- test_darwin

- sync_docs_s3:
filters:
branches:
only:
- master
requires:
- test_linux
tagged_release:
jobs:
- test_linux:
Expand Down

0 comments on commit 5633979

Please sign in to comment.