Skip to content

Commit

Permalink
added s3 sync
Browse files Browse the repository at this point in the history
  • Loading branch information
ponkio-o committed Mar 2, 2024
1 parent 8b4f6ce commit 7cb6945
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ jobs:
- name: Build
run: hugo

- name: aws cli
- name: Setup aws-cli
run: |
export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
export AWS_DEFAULT_REGION=auto
aws s3api list-objects-v2 --endpoint-url $ENDPOINT --bucket portfolio --region auto
echo "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" >> $GITHUB_ENV
echo "AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" >> $GITHUB_ENV
echo "AWS_DEFAULT_REGION=auto" >> $GITHUB_ENV
echo "ENDPOINT=$ENDPOINT" >> $GITHUB_ENV
env:
ENDPOINT: ${{secrets.S3_ENDPOINT}}
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
ENDPOINT: ${{secrets.S3_ENDPOINT}}

- name: Upload to R2
working-directory: public
run: aws s3 sync . --endpoint-url $ENDPOINT --bucket s3://portfolio/

0 comments on commit 7cb6945

Please sign in to comment.