File tree Expand file tree Collapse file tree 2 files changed +40
-14
lines changed
Expand file tree Collapse file tree 2 files changed +40
-14
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to S3
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ permissions :
9+ id-token : write # required for requesting the JWT for OpenID Connect (OIDC)
10+ contents : read # required for actions/checkout
11+
12+ jobs :
13+ deploy :
14+ runs-on : ubuntu-slim
15+ environment : production
16+
17+ env :
18+ AWS_REGION : us-east-1
19+
20+ steps :
21+ - name : Git checkout repository
22+ uses : actions/checkout@v4
23+
24+ - name : configure AWS credentials
25+ uses : aws-actions/configure-aws-credentials@v4
26+ with :
27+ role-to-assume : arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/GitHubActions
28+ role-session-name : ${{ github.event.repository.name }}-${{ github.run_id }}
29+ aws-region : ${{ env.AWS_REGION }}
30+
31+ - name : sync to AWS S3
32+ run : |
33+ aws s3 sync . s3://${{ vars.S3_BUCKET }} \
34+ --delete \
35+ --exact-timestamps \
36+ --exclude ".aws/*" \
37+ --exclude ".git/*" \
38+ --exclude ".github/*" \
39+ --exclude "README.md" \
40+ --exclude "LICENSE"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments