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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/actions/pnpm-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runs:
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8 # or your preferred version
version: 8

- name: Get pnpm store directory
id: pnpm-cache
Expand Down
67 changes: 0 additions & 67 deletions .github/workflows/ci-app.yml

This file was deleted.

72 changes: 0 additions & 72 deletions .github/workflows/ci-one-app.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: APP CI

on:
pull_request:
paths:
- 'services/**'
- 'package.json'
- 'pnpm-lock.yaml'
- '.github/workflows/**'

permissions:
actions: read
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
DEFAULT_NODE_VERSION: '20.13.0'
HUSKY: '0'
NEXT_TELEMETRY_DISABLED: '1'
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

jobs:
main:
name: 🚀 CI Pipeline
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: 📥 Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🔨 Setup Node.js
uses: actions/setup-node@v3
timeout-minutes: 1
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}

- name: 📦 Install Dependencies
uses: ./.github/actions/pnpm-install
timeout-minutes: 5

- name: 🔄 Set Nx Base/Head
uses: nrwl/nx-set-shas@v4

- name: 🔑 Create Environment File
timeout-minutes: 1
run: |
echo '${{ secrets.DEV_REACT_APP_CONFIG }}' > config.json
echo '${{ secrets.DEV_ONE_APP_CONFIG }}' | jq -r 'to_entries | .[] | "\(.key)=\(.value)"' > services/one-app/.env

- name: 🏃 Run CI Tasks
run: |
pnpm nx affected --parallel=3 -t type-check,build,test,lint
4 changes: 3 additions & 1 deletion .github/workflows/deploy-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
# 추후 develop 브렌치는 제외
- develop
paths:
- 'services/ahhachul.com/**'

Expand Down Expand Up @@ -39,7 +41,7 @@ jobs:
cat config.json | jq -r 'to_entries[] | "\(.key)=\(.value)"' >> services/ahhachul.com/.env

- name: Build ahhachul.com
run: pnpm build:app
run: pnpm app:build

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
# 추후 develop 브렌치는 제외
- develop
paths:
- 'services/one-app/**'

Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
25 changes: 16 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
FROM node:20-alpine
FROM node:20.13.0-alpine

RUN npm install -g pnpm

RUN apk add --no-cache libc6-compat

WORKDIR /app

COPY services/one-app ./services/one-app
COPY nx.json tsconfig* ./
COPY package.json ./
COPY pnpm-lock.yaml ./
COPY pnpm-workspace.yaml ./
COPY .nx ./
COPY packages/utils ./packages/utils
COPY services/one-app ./services/one-app
COPY nx.json tsconfig* ./
COPY package.json ./
COPY pnpm-lock.yaml ./
COPY pnpm-workspace.yaml ./
COPY .nx ./

RUN pnpm install

RUN pnpm add -w sharp

ENV NEXT_TELEMETRY_DISABLED=1

RUN pnpm build:one-app
RUN pnpm nextjs:build

EXPOSE 3000

CMD ["pnpm", "start:one-app"]
CMD ["pnpm", "nextjs:start"]
Loading
Loading