Skip to content

Commit 68ed1a3

Browse files
committed
1158: Add GitHub action to deploy JShell to AWS
1 parent ff3612d commit 68ed1a3

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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

0 commit comments

Comments
 (0)