Uploading documentation
Docs are stored in the docs.openmm.org S3 bucket (hosted at the same address). They are linked from the openmm.org website (bucketed at the same name). Docs are automatically built and uploaded to /development/
. In preparation for a release, copy the /development/
folder to the release's folder, e.g. /7.0.0/
, as well as the /latest/
folder.
Use the official Amazon client for python
pip install awscli
I like making a backup of a bucket before monkeying with it. Create an empty git repository with git --init
. Save the following script into a file called sync.sh
# sync.sh
# Run this locally to create a backup
# Put the backup under git revision control.
set -e
if [ "$1" == "--force" ]
then
arg=""
else
arg="--dryrun"
fi
aws s3 sync s3://docs.openmm.org/ ./ --delete --exclude ".git/*" \
--exclude "sync.sh" --region=us-west-1 $arg
if [ "$1" == "--force" ];
then
echo "synced!"
else
echo ""
echo "This was a dry run. Use --force to actually do the sync"
echo ""
fi
Run this script and commit all the files to your git repository. You can periodically run sync.sh
and commit the results to create a time-resolved backup of the bucket.
(replace 7.0.0 with the version number)
aws s3 cp --recursive s3://docs.openmm.org/development s3://docs.openmm.org/7.0.0 --region=us-west-1
You can run the sync script now and your local copy should reflect the new directory.
Change the links in https://github.com/pandegroup/openmm-org to point to the new docs