Skip to content
Merged
Show file tree
Hide file tree
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
24 changes: 17 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
outputs:
back: ${{ steps.filter.outputs.back }}
front: ${{ steps.filter.outputs.front }}
compose: ${{ steps.filter.outputs.compose }}
steps:
- name: Checkout (full history)
uses: actions/checkout@v4
Expand All @@ -39,16 +40,14 @@ jobs:
filters: |
back:
- 'backend/**'
- 'docker-compose.yml' # ⬅ 추가
- '.github/workflows/deploy.yml' # ⬅ 추가
front:
- 'frontend/**'
- 'docker-compose.yml' # ⬅ 추가
- '.github/workflows/deploy.yml' # ⬅ 추가
compose:
- 'docker-compose.yml'
# 2. 백엔드 빌드
build-back:
needs: [changes] # deploy는 job 들이 병렬 처리가 되므로, 리스트 항목이 모두 끝나야 시작된다는 조건 추가
#if: ${{ needs.changes.outputs.back == 'true' || github.event_name == 'workflow_dispatch' }}
if: ${{ needs.changes.outputs.back == 'true' || github.event_name == 'workflow_dispatch' }}
environment: development
runs-on: ubuntu-latest
permissions: { contents: read, packages: write }
Expand Down Expand Up @@ -87,7 +86,7 @@ jobs:

build-front:
needs: [changes] # deploy는 job 들이 병렬 처리가 되므로, 리스트 항목이 모두 끝나야 시작된다는 조건 추가
#if: ${{ needs.changes.outputs.front == 'true' || github.event_name == 'workflow_dispatch' }}
if: ${{ needs.changes.outputs.front == 'true' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
environment: development # development 이라는 environment에 있는 secrets 들을 쓰기 위함
permissions: { contents: read, packages: write }
Expand Down Expand Up @@ -127,7 +126,18 @@ jobs:
#cache-to: type=gha,mode=max

deploy:
#if: ${{ always() && (needs.build-back.result == 'success' || needs.build-front.result == 'success') }}
if: >-
${{
always() &&
!cancelled() &&
needs.build-back.result != 'failure' &&
needs.build-front.result != 'failure' &&
(
needs.build-back.result == 'success' ||
needs.build-front.result == 'success' ||
needs.changes.outputs.compose == 'true'
)
}}
needs: [changes, build-back, build-front] # deploy는 job 들이 병렬 처리가 되므로, 리스트 항목이 모두 끝나야 시작된다는 조건 추가
# - manual 실행(workflow_dispatch)이면 무조건 실행
# - push일 때는 둘 중 하나라도 성공한 경우에만 실행 (둘 다 failure가 아닌 이상 OK)
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Frontend-CI

on:
pull_request:
branches: [main]
paths:
- "frontend/**"
- ".github/workflows/frontend-ci.yml"
workflow_dispatch: {}

permissions:
contents: read

jobs:
build:
name: Frontend Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend

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

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build
26 changes: 4 additions & 22 deletions frontend/src/components/Board/RichTextEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import toolboxMidIcon from '../../assets/toolbox-mid-icon.svg';
import toolboxRightIcon from '../../assets/toolbox-right-icon.svg';
import toolboxLineIcon from '../../assets/toolbox-line-icon.svg';
import toolboxColonIcon from '../../assets/toolbox-colon-icon.svg';
import toolboxVideoIcon from '../../assets/toolbox-video-icon.svg';
import toolboxTextColorIcon from '../../assets/toolbox-textcolor-icon.svg';
import toolboxTextBgIcon from '../../assets/toolbox-textBackgroundColor-icon.svg';

Expand Down Expand Up @@ -53,6 +54,7 @@ const FONT_FAMILY_OPTIONS = [
];

const FONT_SIZE_OPTIONS = [12, 14, 16, 18, 20, 24, 28, 32, 40];
const DEFAULT_FONT_SIZE = 16;
const IMAGE_UPLOAD_ACCEPT = '.jpg,.jpeg,.png,.webp,.gif';
const FILE_UPLOAD_ACCEPT = '.pdf,.docx,.xlsx,.pptx,.csv,.txt,.mp4,.webm,.mov';

Expand Down Expand Up @@ -347,11 +349,13 @@ const RichTextEditor = ({
onUploadImage,
onImageInserted,
onUploadFile,
onUploadVideo,
onAttachFiles,
}) => {
const onChangeRef = useRef(onChange);
const imageInputRef = useRef(null);
const fileInputRef = useRef(null);
const videoInputRef = useRef(null);
const [isUploadingImage, setIsUploadingImage] = useState(false);
const [, setSelectionTick] = useState(0);

Expand Down Expand Up @@ -732,28 +736,6 @@ const RichTextEditor = ({
} finally {
event.target.value = '';
}
const promptLink = () => {
if (!editor || !editable) return;

const previousUrl = editor.getAttributes('link').href || '';
const nextUrl = window.prompt('링크 주소를 입력하세요.', previousUrl);

if (nextUrl === null) return;

const trimmedUrl = nextUrl.trim();

if (!trimmedUrl) {
editor.chain().focus().extendMarkRange('link').unsetLink().run();
return;
}

editor.chain().focus().extendMarkRange('link').setLink({ href: trimmedUrl }).run();
};

const clearFormatting = () => {
if (!editor || !editable) return;

editor.chain().focus().unsetAllMarks().clearNodes().setParagraph().run();
};

const applyTextColor = (color) => {
Expand Down
Loading