Stricter check for release branch + Refactor

Also:
- Don't crash if there are no tags in the repo.
- Install awscli only when needed
This commit is contained in:
Nicola Soranzo
2021-03-26 16:28:24 +00:00
parent c9275068b2
commit 9777eea05a
2 changed files with 18 additions and 21 deletions
+1 -1
View File
@@ -50,7 +50,6 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
pip install awscli
case "$TARGET_BRANCH" in
release_[[:digit:]][[:digit:]].[[:digit:]][[:digit:]]|master)
UPLOAD_DIR=$TARGET_BRANCH
@@ -63,4 +62,5 @@ jobs:
exit 0
;;
esac
pip install awscli
aws s3 sync doc/build/html/ "s3://galaxy-docs/en/$UPLOAD_DIR" --region us-east-2 --size-only --delete