File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : deploy
2
+ on :
3
+ push :
4
+ branches : [ master ]
5
+ paths :
6
+ - ' jshell-aws-backend/**'
7
+ workflow_dispatch :
8
+
9
+ permissions :
10
+ id-token : write
11
+ contents : read
12
+
13
+ jobs :
14
+ deploy :
15
+ name : Deploy to AWS
16
+ runs-on : ubuntu-latest
17
+ env :
18
+ AWS_REGION : eu-west-2
19
+ steps :
20
+ - name : Check out code
21
+ uses : actions/checkout@v4
22
+
23
+ - name : Authenticate with AWS
24
+ uses : aws-actions/configure-aws-credentials@v4
25
+ with :
26
+ role-to-assume : ${{ secrets.GH_ACTIONS_ROLE_ARN }}
27
+ aws-region : ${{ env.AWS_REGION }}
28
+
29
+ - name : Install SAM CLI
30
+ uses : aws-actions/setup-sam@v2
31
+ with :
32
+ use-installer : true
33
+
34
+ - name : Install Java
35
+ uses : actions/setup-java@v3
36
+ with :
37
+ java-version : ' 21'
38
+ distribution : ' corretto'
39
+
40
+ - name : Build Application
41
+ run : sam build -t infrastructure/template.yaml
42
+
43
+ - name : Deploy to AWS
44
+ run : sam deploy --no-confirm-changeset --no-fail-on-empty-changeset --config-file infrastructure/samconfig.toml
You can’t perform that action at this time.
0 commit comments