-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
전남대 FE_강호정 6주차 과제 #113
전남대 FE_강호정 6주차 과제 #113
Changes from 22 commits
0cbcc15
c58c782
5ac9330
95a609f
a177a32
918c544
5300672
03d65f0
febfaef
5600465
6491ec4
690e92e
57ed942
0fc19b3
13252cf
413aba1
e1954aa
49820ef
9a1274a
7296417
102106f
a7d59bb
d2d4b81
ba289a1
c99bdec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- step1 | ||
pull_request: | ||
branches: | ||
- hojeong26 | ||
# paths: // path는 특정 폴더에 변경사항이 생겼을 때 작동하도록 설정할 수 있음 | ||
# - "services/**" | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.TOKEN }} | ||
publish_dir: ./build |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,16 @@ | |
"^axios$": "axios/dist/node/axios.cjs" | ||
} | ||
}, | ||
"homepage": "https://hojeong26.github/react-deploy", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. gh-pages로 배포하는 것이지요? 깃헙페이지 기본 도메인은 {name}.github.io이 맞습니다. io 다시 넣어주세요~! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. github.io저장소를 만들고 파일들을 github.io저장소로 가져와야 되나요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. gh-pages 배포방식은, 빌드된 프로젝트 결과물 자체를 gh-page 브랜치에 올리고 이를 깃허브가 무료로 제공하는 저장소에 배포되도록 하는 것입니다. 그리고 github actions를 통해 이 과정 자체를 자동화하는 것이고요. 이를 CI/CD라고 합니다. 즉, 두 개념은 다릅니다. gh-pages배포방식과 함께 github actions로 배포를 자동화하는 것을 함께 찾아보시고 적용해보세요. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 기본적으로 Repository가 gh-pages를 바라보게 되어있는지 등도 체크해야 합니다. 아래 문서를 참고해보세요. 그리고 이후에 이 배포과정을 자동화해주는 github actions를 설정해보세요 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 배포 성공한 것 같은데 npm run start를 했을 땐 오류가 안났는데 배포된 웹페이지로 들어가면 에러가 납니다.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. http://192.168.56.1:3000/react-deploy There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 남겨주신 링크는 본인의 로컬 ip주소인 것으로 보입니다. 그 주소에 접속하려면 외부에 공개해야해서 저는 진입할 수 없습니다. 아래 깃헙페이지에 잘 배포된 것 확인했습니다. 엔트리를 react-deploy로 잡았기 때문에 이를 꼭 붙여줘야해요 |
||
"scripts": { | ||
"start:mock": "cross-env REACT_APP_RUN_MSW=true npm run start", | ||
"start": "craco start", | ||
"build": "craco build", | ||
"test": "craco test", | ||
"storybook": "storybook dev -p 6006", | ||
"build-storybook": "storybook build" | ||
"build-storybook": "storybook build", | ||
"predeploy": "npm run build", | ||
"deploy": "gh-pages -d build" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
|
@@ -37,6 +40,7 @@ | |
"axios": "^1.6.7", | ||
"craco-alias": "^3.0.1", | ||
"framer-motion": "^11.0.6", | ||
"gh-pages": "^6.1.1", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-error-boundary": "^4.0.12", | ||
|
@@ -45,6 +49,7 @@ | |
"react-router-dom": "^6.22.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-proposal-private-property-in-object": "^7.21.11", | ||
"@craco/craco": "^7.1.0", | ||
"@emotion/eslint-plugin": "^11.11.0", | ||
"@storybook/addon-essentials": "^7.6.17", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기로 접속하면 에러가 뜨는데요. 프론트 배포된 것 맞을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아직 에러 수정하고 있습니다..!