summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2024-03-30 20:16:40 +0000
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2024-03-30 20:16:40 +0000
commit4718d76601b8b1f6b095ebe16f3372b9970d58b5 (patch)
treed0831599c4ba72f3a7e5a162f3a0e0ab38263f60 /.github
parent7bf730a601014d79c61e7a1affa0e612741ca70d (diff)
Configures credentials using env vars
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-and-deploy.yml9
1 files changed, 8 insertions, 1 deletions
diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml
index b032b07..c5d10f7 100644
--- a/.github/workflows/build-and-deploy.yml
+++ b/.github/workflows/build-and-deploy.yml
@@ -17,6 +17,9 @@ jobs:
build:
name: Build with Astro and deploy to S3
runs-on: ubuntu-latest
+ env:
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -37,4 +40,8 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Sync S3 bucket
- run: aws s3 sync ./dist/ s3://joeac-personal-website --delete
+ run: |
+ aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
+ aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
+ aws configure set region eu-west-2
+ aws s3 sync ./dist/ s3://joeac-personal-website --delete