Skip to content

Commit 123a5af

Browse files
committed
ensure no git directory is exposed
1 parent 89639b1 commit 123a5af

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/deploy-website.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ jobs:
1616
with:
1717
ref: jpl
1818

19+
- name: Configure AWS credentials
20+
uses: aws-actions/configure-aws-credentials@v4
21+
with:
22+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
23+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
24+
aws-region: us-west-2
25+
1926
- name: Sync to S3
2027
uses: jakejarvis/s3-sync-action@master
2128
with:
@@ -24,6 +31,8 @@ jobs:
2431
AWS_S3_BUCKET: ${{ secrets.S3_BUCKET }}
2532
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
2633
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
27-
AWS_REGION: 'us-west-2'
28-
SOURCE_DIR: '.' # or 'public' or whatever the root is
34+
AWS_REGION: "us-west-2"
35+
SOURCE_DIR: "." # or 'public' or whatever the root is
2936

37+
- name: Remove .git directory from S3
38+
run: aws s3 rm s3://${{ secrets.S3_BUCKET }}/.git --recursive

0 commit comments

Comments
 (0)