Skip to content

Commit

Permalink
Adding aws sync to s3 website bucket (#1254)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatskaari committed Sep 30, 2020
1 parent 0306dbc commit e5a2b6d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
20 changes: 19 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ jobs:
path: plz-out/results
- run:
name: Package
command: ./plz-out/bin/src/please build //package:signer //tools/misc:gen_release //docs:tarball -p
command: ./plz-out/bin/src/please build //package:signer //tools/misc:gen_release //docs:tarball //docs:deep-tarball -p
- persist_to_workspace:
root: plz-out/pkg
paths:
- gen_release.pex
- release_signer
- docs.tar.gz
- deep-docs.tar.gz
- store_artifacts:
path: plz-out/log
- save_cache:
Expand Down Expand Up @@ -270,6 +271,17 @@ jobs:
working_directory: /tmp/site
command: tar -xzf docs.tar.gz && sftp -oStrictHostKeyChecking=no -b /root/sftp.txt 3472291@sftp.dc2.gpaas.net

aws-sync:
docker:
- image: thoughtmachine/please_docs:20190318
steps:
- attach_workspace:
at: /tmp/site
- run:
name: Upload docs
working_directory: /tmp/site
#TODO(jpoole): updawte the docs image instead of installing this here
command: apt-get update && DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y awscli && tar -xzf deep-docs.tar.gz && aws s3 sync docs s3://please-build
workflows:
version: 2
build-all:
Expand Down Expand Up @@ -309,3 +321,9 @@ workflows:
filters:
branches:
only: master
- aws-sync:
requires:
- build-linux
filters:
branches:
only: master
9 changes: 9 additions & 0 deletions docs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,22 @@ filegroup(
],
)

#TODO(jpoole): unify these two once we switch to the new website
tarball(
name = "tarball",
srcs = [":docs"],
out = "docs.tar.gz",
labels = ["hlink:plz-out/pkg"],
)

tarball(
name = "deep-tarball",
srcs = [":docs"],
out = "deep-docs.tar.gz",
labels = ["hlink:plz-out/pkg"],
flatten = False,
)

go_binary(
name = "templater",
srcs = ["template.go"],
Expand Down
1 change: 1 addition & 0 deletions docs/acknowledgements.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ <h1>Acknowledgements</h1>
<li><a href="https://github.com/williambhot">William Bhot</a></li>
<li><a href="https://github.com/agenticarus">Mike Cripps</a></li>
<li><a href="https://github.com/BNMetrics">Luna Chen</a></li>
<li><a href="https://github.com/tatskaari">Jon Poole</a></li>
</ul>
<p>

Expand Down
4 changes: 0 additions & 4 deletions docs/player.js

This file was deleted.

0 comments on commit e5a2b6d

Please sign in to comment.