Skip to content

Commit

Permalink
FIX asset sync fails
Browse files Browse the repository at this point in the history
Summary:
* aws installs using pip is deprecated
  • Loading branch information
pjshwa committed Mar 2, 2024
1 parent d810b16 commit 1dc30d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
echo "<?php \$credentials = array('host' => 'localhost', 'user' => '${{ secrets.DBUSER }}', 'pass' => '${{ secrets.DBPASS }}', 'database' => 'pjshwa'); ?>" | tee -a $current_directory/credentials.php
# Sync assets
AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} /home/bitnami/.pyenv/shims/aws s3 sync s3://pjshwa-homepage-assets/static ./static --delete
AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} aws s3 sync s3://pjshwa-homepage-assets/static ./static --delete
# Symlink current directory
cd $root_directory
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-stag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
echo "<?php \$credentials = array('host' => 'localhost', 'user' => '${{ secrets.DBUSER }}', 'pass' => '${{ secrets.DBPASS }}', 'database' => 'pjshwa_test'); ?>" | tee -a $current_directory/credentials.php
# Sync assets
AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} /home/bitnami/.pyenv/shims/aws s3 sync s3://pjshwa-homepage-assets/static ./static --delete
AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} aws s3 sync s3://pjshwa-homepage-assets/static ./static --delete
# Symlink current directory
cd $root_directory
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
key: ${{ secrets.PRIVATE_KEY }}
script: |
root_directory="/home/bitnami/htdocs-prod"
AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} /home/bitnami/.pyenv/shims/aws s3 sync s3://pjshwa-homepage-assets/static $root_directory/current/static --source-region ap-northeast-2 --delete
AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} aws s3 sync s3://pjshwa-homepage-assets/static $root_directory/current/static --source-region ap-northeast-2 --delete

0 comments on commit 1dc30d1

Please sign in to comment.