-# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
-ENCRYPTION_LABEL=e3a2d77100be
-ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
-ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
-ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}
-ENCRYPTED_IV=${!ENCRYPTED_IV_VAR}
-openssl aes-256-cbc -K "$ENCRYPTED_KEY" -iv "$ENCRYPTED_IV" -in .github/deploy_key.enc -out .github/deploy_key -d
-chmod 600 .github/deploy_key
-eval "$(ssh-agent -s)"
-ssh-add .github/deploy_key
-
-git add .
-git commit -m "Automatic deploy to GitHub Pages: ${SHA}"
+if [[ -n $TAG_NAME ]]; then
+ # Add the new dir
+ git add "$TAG_NAME"
+ # Update the symlink
+ git add stable
+ # Update versions file
+ git add versions.json
+ git commit -m "Add documentation for ${TAG_NAME} release: ${SHA}"
+elif [[ $BETA = "true" ]]; then
+ git add beta
+ git commit -m "Automatic deploy to GitHub Pages (beta): ${SHA}"
+else
+ git add .
+ git commit -m "Automatic deploy to GitHub Pages: ${SHA}"
+fi