Skip to content

Fix rate-limit consume and minor changes #65

Fix rate-limit consume and minor changes

Fix rate-limit consume and minor changes #65

Workflow file for this run

name: Deploy Foxogram
on:
push:
branches: [ "main", "dev" ]
jobs:
build:
runs-on: cloud
environment: ${{ github.ref_name == 'main' && 'production' || github.ref_name == 'dev' && 'development' || 'development' }}
steps:
- uses: actions/checkout@v4
- name: Create config
run: echo -e "spring.datasource.driver-class-name=org.postgresql.Driver\n
spring.datasource.username=${{ secrets.DB_USERNAME }}\n
spring.datasource.password=${{ secrets.DB_PASSWORD }}\n
spring.datasource.url=jdbc:postgresql://${{ secrets.DB_HOSTNAME }}:${{ secrets.DB_PORT }}/${{ secrets.DB_DATABASE }}\n
spring.jpa.hibernate.ddl-auto=update\n
smtp.host=${{ secrets.SMTP_HOSTNAME }}\n
smtp.port=${{ secrets.SMTP_PORT }}\n
smtp.username=${{ secrets.SMTP_USERNAME }}\n
smtp.password=${{ secrets.SMTP_PASSWORD }}\n
smtp.email=${{ secrets.SMTP_EMAIL }}\n
springdoc.api-docs.path=/docs\n
springdoc.swagger-ui.enabled=false\n
jwt.secret=${{ secrets.JWT_SECRET }}\n
api.version=1\n
api.env=${{ github.ref_name == 'main' && 'prod' || github.ref_name == 'dev' && 'dev' || 'dev' }}" >> foxogram-common/src/main/resources/application.properties
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
- name: Build Foxogram API
run: ./gradlew :foxogram-api:build
- name: Run Foxogram API
run: docker compose -f docker-compose-${{ github.ref_name == 'main' && 'prod' || github.ref_name == 'dev' && 'dev' || 'dev' }}.yml up -d --build