Skip to content

Refactor: cookie에 SameSite 옵션 추가(추후 롤백 가능성) #27

Refactor: cookie에 SameSite 옵션 추가(추후 롤백 가능성)

Refactor: cookie에 SameSite 옵션 추가(추후 롤백 가능성) #27

Workflow file for this run

name: hhive
on:
pull_request:
branches: [ dev ]
types: [closed]
jobs:
build-docker-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Gradle
run: ./gradlew build -Pprofile=test
- name: Build and push Docker image
run: |
sudo docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
sudo docker build -f Dockerfile -t ${{ secrets.DOCKERHUB_USERNAME }}/hhive .
sudo docker push ${{ secrets.DOCKERHUB_USERNAME }}/hhive
- name: Deploy Front to prod
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.AWS_HOST }}
username: ubuntu
key: ${{ secrets.AWS_SSH_KEY }}
port: 22
script: |
docker rm -f $(docker ps -qa)
docker rmi ${{ secrets.DOCKERHUB_USERNAME }}/hhive
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/hhive
docker compose up -d