mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
Update instructions for publishing documentation (#2757)
This commit is contained in:
parent
d44ba4bb1d
commit
1bd2a34877
@ -63,38 +63,10 @@ The docs get built as part of the main `daml` repo CI, to make sure we don't bre
|
||||
|
||||
## Publishing docs
|
||||
|
||||
### Prerequisites
|
||||
|
||||
To publish to the docs, you'll need to:
|
||||
|
||||
- Get access to the S3 bucket and Cloudfront (DA only).
|
||||
- Create a directory to run everything from. Mine is `s3-env`.
|
||||
- Install [AWS Google Auth tool](https://digitalasset.atlassian.net/wiki/spaces/IS/pages/719750045/AWS+Google+Auth) (DA only, internal link).
|
||||
- Run the following:
|
||||
|
||||
```
|
||||
# cd to the directory you created above
|
||||
pipenv --python 3.6
|
||||
pipenv install awscli
|
||||
pipenv install aws-google-auth
|
||||
```
|
||||
|
||||
### Once setup is done
|
||||
|
||||
After you've gone through the above steps, you can publish:
|
||||
|
||||
```
|
||||
# if you're not already in it, cd to the directory you created above
|
||||
pipenv shell
|
||||
# use google account password. Be fast!
|
||||
aws-google-auth -u <yourname>@digitalasset.com
|
||||
# cd to daml repo
|
||||
# this bit takes a while. If it asks you about overwriting files, say yes
|
||||
docs/scripts/publish.sh
|
||||
exit
|
||||
```
|
||||
|
||||
To publish to the staging website instead, use `docs/scripts/publish.sh --stage`.
|
||||
Documentation is published automatically whenever a release is made
|
||||
public on Github. Note that there is a delay so you might have to wait
|
||||
up to an hour until the docs are published after making a release
|
||||
public.
|
||||
|
||||
## Testing code in docs
|
||||
|
||||
|
@ -1,44 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2019 The DAML Authors. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Needs to be run with the `aws` command available and
|
||||
# after running `aws-google-auth`.
|
||||
|
||||
set -euo pipefail
|
||||
export AWS_PROFILE=sts
|
||||
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
STAGE=false
|
||||
|
||||
for arg in "$@"
|
||||
do
|
||||
if [ "$arg" = "--stage" ]; then
|
||||
STAGE=true
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $STAGE == true ]; then
|
||||
BUCKET=s3://docs-daml-com-staging/
|
||||
else
|
||||
BUCKET=s3://docs-daml-com/
|
||||
fi
|
||||
|
||||
bazel build //docs
|
||||
tar -zxf ../../bazel-genfiles/docs/html.tar.gz
|
||||
|
||||
aws s3 sync \
|
||||
html \
|
||||
$BUCKET \
|
||||
--delete \
|
||||
--acl public-read \
|
||||
--exclude .doctrees/** \
|
||||
--exclude .buildinfo
|
||||
|
||||
rm -r html
|
||||
|
||||
if [ $STAGE == false ]; then
|
||||
aws cloudfront create-invalidation --distribution-id E1U753I56ERH55 --paths '/*'
|
||||
fi
|
@ -85,3 +85,6 @@
|
||||
1. Leave a comment like "All manual tests have passed" on the release PR on
|
||||
GitHub.
|
||||
1. Finally, announce the release in the relevant Slack channels.
|
||||
1. Documentation is published automatically once you make the release
|
||||
public on Github but you might have to wait up to an hour for the
|
||||
job to run.
|
||||
|
Loading…
Reference in New Issue
Block a user