Skip to content

Commit

Permalink
Sync built docs in master to s3 (#5941)
Browse files Browse the repository at this point in the history
* Sync built docs in master to s3

* Persist to worspace only in linux64 specs

Otherwise maintenance fails because all test_* workspace are restored
bcardiff authored and RX14 committed Apr 11, 2018
1 parent c541aae commit 8dd6f54
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,15 @@ jobs:
TRAVIS_OS_NAME: linux
ARCH: x86_64
ARCH_CMD: linux64
steps: *ci_steps
steps:
- checkout
- run: bin/ci prepare_system
- run: bin/ci prepare_build
- run: bin/ci build
- persist_to_workspace:
root: .
paths:
- docs

test_linux32:
machine: true
@@ -37,6 +45,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
@@ -243,7 +265,13 @@ workflows:
- test_linux
- test_linux32
- test_darwin

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

0 comments on commit 8dd6f54

Please sign in to comment.