Skip to content

Commit cd2b47f

Browse files
committed
Add GitHub Actions deploy workflow final 1
1 parent 2acb74b commit cd2b47f

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy to S3
1+
name: Deploy to S3 (Debug Friendly)
22

33
on:
44
push:
@@ -8,19 +8,32 @@ on:
88
jobs:
99
deploy:
1010
runs-on: ubuntu-latest
11+
1112
steps:
13+
# Step 1: Checkout code
1214
- name: Checkout code
1315
uses: actions/checkout@v3
1416

17+
# Step 2: List all files (to verify repo structure)
18+
- name: List all repo files
19+
run: ls -R
20+
21+
# Step 3: Configure AWS credentials
1522
- name: Configure AWS Credentials
1623
uses: aws-actions/configure-aws-credentials@v2
1724
with:
1825
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
1926
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
2027
aws-region: ap-south-1
2128

22-
- name: Sync portfolio folder to S3
23-
run: aws s3 sync ./portfolio/ s3://devops-portfolio-likeshbarve --acl public-read --delete
29+
# Step 4: Test AWS access
30+
- name: Verify access to S3 bucket
31+
run: aws s3 ls s3://devops-portfolio-likeshbarve
32+
33+
# Step 5: Sync files to S3
34+
- name: Sync files to S3
35+
run: aws s3 sync ./ s3://devops-portfolio-likeshbarve --acl public-read --delete
2436

25-
- name: Invalidate CloudFront cache
26-
run: aws cloudfront create-invalidation --distribution-id E1AENBSNPXIBXG --paths "/*"
37+
# Step 6: Confirm deployment
38+
- name: Confirm S3 Deployment
39+
run: echo "Deployment completed. Check your bucket: s3://devops-portfolio-likeshbarve"

0 commit comments

Comments
 (0)