Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- angular animation
- 검색
- ajax 사용 예시
- Router
- Angular Router
- 앵귤러 모달
- 앵귤러 애니메이션
- route
- formgroup
- angular button
- summary
- 모달
- 셀렉트박스 커스텀
- flex-1
- ApexChart
- prisma
- egov spring ajax 사용 예시
- mysql if
- scroll
- 호버
- 스크롤 이벤트
- TAILWIND
- 옵저버블
- 스크롤 이벤트 감지
- angular modal
- modal
- Oracle LISTAGG 사용 예시
- 아이오닉 스크롤 이벤트
- angular route
- Ionic modal
Archives
- Today
- Total
깜놀하는 해므찌로
Github action deploy 깃허브 액션 배포 예시 본문
반응형
SMALL
"generatePackageJson": true
1. 설정 추가하기
2. github workflows 폴더 생성 및 deploy_server.yml 확장자 파일 생성
name: Deploy Server
on:
push:
branches:
- 'develop'
paths:
- 'apps/server/**'
workflow_dispatch:
jobs:
deploy_server:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: npm install --force
- name: Build Project
run: |
nx build server --configuration production
rm -rf c/workspace/프로젝트명/server
mkdir c/workspace/프로젝트명/server
cp -r dist/apps/server c/workspace/프로젝트명/server
cp ecosystem.config.js c/workspace/프로젝트명/server/ecosystem.config.js
cp .env.serve.production c/workspace/프로젝트명/server/.env
cd c/workspace/프로젝트명/server
npm install --production
pm2 restart ecosystem.config.js --update-env
3. 작성 예시 (푸쉬하면 바로 배포 하도록 설정)
https://docs.github.com/ko/actions/using-workflows/workflow-syntax-for-github-actions
GitHub Actions에 대한 워크플로 구문 - GitHub Docs
워크플로는 하나 이상의 작업으로 구성된 구성 가능한 자동화된 프로세스입니다. 워크플로 구성을 정의하려면 YAML 파일을 만들어야 합니다.
docs.github.com
작성법 참조 링크
4. 최상단 뎁스에 ecosystem.config.js 파일 생성
exports.modules = {
apps: [{ name: '@프로젝트명/server', script: 'dist/src/index.js' }],
};
5. 에코시스템 config 파일 내부 설정
끝!
반응형
LIST
'IT' 카테고리의 다른 글
Nx Angular Lib 생성 및 활용 (0) | 2023.08.09 |
---|---|
StringMap 활용 간략 예시 (0) | 2023.08.08 |
Github Action Deploy 배포 시 이미지 파일 크기로 인한 오류 해결 (0) | 2023.08.06 |
Open Gragh 오픈 그래프 / 카카오 url 전송 시 사이트 설명 보이도록 설정하기 예시 (0) | 2023.08.05 |
NullInjectorError: No provider for HttpClient! 에러 해결 (0) | 2023.08.04 |