Skip to content

Commit

Permalink
library updates
Browse files Browse the repository at this point in the history
  • Loading branch information
vladstanescu committed Nov 19, 2024
1 parent 2c5a0fb commit 6ff4b20
Show file tree
Hide file tree
Showing 6 changed files with 2,865 additions and 3,133 deletions.
5 changes: 5 additions & 0 deletions .astro/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"_variables": {
"lastUpdateCheck": 1732009289433
}
}
1 change: 1 addition & 0 deletions .astro/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="astro/client" />
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,56 @@ All commands are run from the root of the project, from a terminal:
## 👀 Want to learn more?

Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).

## Deployment AWS

Deployment is done automatically on push using the GitHub Actions workflow in `.github/workflows/build-deploy.yml`.

First, set up 2 buckets (DEV and PROD) and 2 CloudFront distributions (DEV and PROD). Also set up the IAM user with the permissions described in the following section.
```
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Bucket1",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "[DEV_BUCKET_ARN]*"
},
{
"Sid": "Bucket2",
"Effect": "Allow",
"Action": "s3:*",
"Resource": "[PROD_BUCKET_ARN]*"
},
{
"Sid": "InvalidationLive",
"Effect": "Allow",
"Action": [
"cloudfront:ListInvalidations",
"cloudfront:GetInvalidation",
"cloudfront:CreateInvalidation"
],
"Resource": "[PROD_CF_ARN]"
},
{
"Sid": "InvalidationDev",
"Effect": "Allow",
"Action": [
"cloudfront:ListInvalidations",
"cloudfront:GetInvalidation",
"cloudfront:CreateInvalidation"
],
"Resource": "[DEV_CF_ARN]"
}
]
}
```

Following parameters needs to be configured as Repository secrets:

- AWS_ACCESS_KEY_ID - AWS access key ID for a IAM user with access as described in the following section
- AWS_SECRET_ACCESS_KEY - AWS secret access key for the IAM user
- S3_BUCKET - S3 bucket name where the build will be deployed
- CF_DISTRIBUTION - CloudFront distribution ID for the production environment
- CF_DISTRIBUTION_DEV - CloudFront distribution ID for the development environment
Loading

0 comments on commit 6ff4b20

Please sign in to comment.