Skip to content

Commit

Permalink
Merge pull request #293 from rstudio/mm-mkdocs
Browse files Browse the repository at this point in the history
Fix s3 copying for new docs build directory
  • Loading branch information
mmarchetti authored May 25, 2021
2 parents dcffb4a + 62aef21 commit c931e51
Showing 1 changed file with 9 additions and 27 deletions.
36 changes: 9 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,23 +135,6 @@ ifeq (Linux,$(shell uname))
DOCKER_RUN_AS = -u $(shell id -u):$(shell id -g)
endif

BUILD_DOC := docker run --rm=true $(DOCKER_RUN_AS) \
-e VERSION=$(VERSION) \
$(DOCKER_ARGS) \
-v $(CURDIR):/rsconnect_jupyter \
-w /rsconnect_jupyter \
pandoc/latex:2.9 docs/build-doc.sh

.PHONY: docs-build
docs-build: docs/out
$(BUILD_DOC)

docs/out:
mkdir -p $@

dist/rsconnect-jupyter-$(VERSION).pdf: docs/README.md docs/*.gif docs/out
$(BUILD_DOC)

.PHONY: version
version:
@echo $(VERSION)
Expand All @@ -169,20 +152,19 @@ sync-latest-to-s3:
.PHONY: sync-latest-docs-to-s3
sync-latest-docs-to-s3:
aws s3 cp --acl bucket-owner-full-control \
--recursive \
--cache-control max-age=0 \
docs/out/rsconnect_jupyter-$(VERSION).html \
$(S3_PREFIX)/latest/rsconnect_jupyter-latest.html
aws s3 cp --acl bucket-owner-full-control \
--cache-control max-age=0 \
docs/out/rsconnect_jupyter-$(VERSION).pdf \
$(S3_PREFIX)/latest/rsconnect_jupyter-latest.pdf
docs/site/ \
$(S3_PREFIX)/latest/

.PHONY: promote-docs-in-s3
promote-docs-in-s3:
aws s3 cp --acl bucket-owner-full-control \
docs/out/rsconnect_jupyter-$(VERSION).html \
s3://docs.rstudio.com/rsconnect-jupyter/rsconnect_jupyter-$(VERSION).html
--recursive \
docs/site/ \
s3://docs.rstudio.com/rsconnect-jupyter/rsconnect_jupyter-$(VERSION)/
aws s3 cp --acl bucket-owner-full-control \
--recursive \
--cache-control max-age=300 \
docs/out/rsconnect_jupyter-$(VERSION).html \
s3://docs.rstudio.com/rsconnect-jupyter/index.html
docs/site/ \
s3://docs.rstudio.com/rsconnect-jupyter/

0 comments on commit c931e51

Please sign in to comment.