Trigger redeploy #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
- name: Copy example properties | |
run: cp common/src/main/resources/properties/server.properties.example common/src/main/resources/properties/server.properties | |
- name: Install requests | |
run: python3 -m pip install requests | |
- name: Run Python deploy script | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
S3_BUCKET_URL: ${{ secrets.S3_BUCKET_URL }} | |
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }} | |
S3_UPLOAD_DIR: ${{ secrets.S3_UPLOAD_DIR }} | |
DB_DOMAIN: ${{ secrets.DB_DOMAIN }} | |
DB_USERNAME: ${{ secrets.DB_USERNAME }} | |
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
GMAIL_APP_PASSWORD: ${{ secrets.GMAIL_APP_PASSWORD }} | |
GMAIL_APP_ENABLED: ${{ secrets.GMAIL_APP_ENABLED }} | |
JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_ENABLED: ${{ secrets.SLACK_ENABLED }} | |
STRIPE_API_SECRET_KEY: ${{ secrets.STRIPE_API_SECRET_KEY }} | |
STRIPE_WEBHOOK_SIGNING_SECRET: ${{ secrets.STRIPE_WEBHOOK_SIGNING_SECRET }} | |
run: python3 ./deploy.py | |
- name: Build the thing :) | |
run: mvn -B clean verify | |
- name: Generate deployment package | |
run: zip build.zip Dockerfile service/target/service-1.0-SNAPSHOT-jar-with-dependencies.jar .ebextensions/size.config | |
- name: Deploy to EB | |
uses: einaregilsson/beanstalk-deploy@v14 | |
with: | |
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
application_name: llb-prod-eb | |
environment_name: llb-prod-env | |
version_label: "llb-${{ github.sha }}" | |
region: us-east-2 | |
deployment_package: build.zip |