Skip to content

Commit

Permalink
1158: Add GitHub action to deploy JShell to AWS
Browse files Browse the repository at this point in the history
  • Loading branch information
surajkumar committed Aug 31, 2024
1 parent 81657be commit 24c59b9
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/deploy-jshell-aws.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: deploy
on:
push:
branches: [ master ]
paths:
- 'jshell-aws-backend/**'
workflow_dispatch:

permissions:
id-token: write
contents: read

jobs:
deploy:
name: Deploy to AWS
runs-on: ubuntu-latest
env:
AWS_REGION: eu-west-2
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Authenticate with AWS
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.GH_ACTIONS_ROLE_ARN }}
aws-region: ${{ env.AWS_REGION }}

- name: Install SAM CLI
uses: aws-actions/setup-sam@v2
with:
use-installer: true

- name: Install Java
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'corretto'

- name: Build Application
run: sam build -t infrastructure/template.yaml

- name: Deploy to AWS
run: sam deploy --no-confirm-changeset --no-fail-on-empty-changeset --config-file infrastructure/samconfig.toml

0 comments on commit 24c59b9

Please sign in to comment.