Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
name: CD - Deploy to AWS

on:
push:
workflow_run:
workflows: ["CI Pipeline"]
types:
- completed
branches:
- main

jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 21

- name: Build
working-directory: backend
run: mvn clean package -DskipTests
- name: Package source bundle
run: cd backend && zip -r ../deploy.zip Dockerfile pom.xml src/

- name: Deploy to Elastic Beanstalk
uses: einaregilsson/beanstalk-deploy@v22
Expand All @@ -32,4 +29,4 @@ jobs:
environment_name: passly-backend-env
region: ${{ secrets.AWS_REGION }}
version_label: v-${{ github.run_number }}
deployment_package: backend/target/passly-backend-0.0.1-SNAPSHOT.jar
deployment_package: deploy.zip
Loading