-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): 개발에 필요한 기본적인 세팅 완료 (#59)
* fix(docs): 사용하지 않는 버튼 제거 * chore(docs): 배포 테스트 * chore(docs): 잡 네임 변경 * chore(docs): fix unknwon workspace * chore(docs): set git conf * chore(docs): 환경에 따라 CNAME 다르게 설정 * chore(docs): 빠진 모듈 추가 * chore(docs): 빠진 환경변수 추가 * chore(docs): CNAME 옮기는 경로 변경 * feat(docs): Docs 개발에 필요한 기본 세팅 완료 * chore(docs): live 배포 스크립트 주석 처리 * chore(docs): 라이브 CICD 다시 살림
- Loading branch information
Showing
17 changed files
with
334 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Alpha Release UI Kit Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- alpha | ||
|
||
jobs: | ||
alpha-release-ui-kit-docs: | ||
if: "!contains(github.event.head_commit.message, '[skip ci]') && contains(github.event.head_commit.message, '(docs)')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: Set Git Configulations | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "lubycon" | ||
- name: Caching Node Modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install depedencies | ||
run: yarn | ||
- name: Build | ||
run: yarn workspace lubycon-ui-kit-docs build | ||
- name: Publish | ||
run: yarn workspace lubycon-ui-kit-docs deploy | ||
env: | ||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
ENV: 'alpha' | ||
- uses: 8398a7/action-slack@v3 # 슬랙 노티피케이션 | ||
with: | ||
status: ${{ job.status }} | ||
fields: repo,message,commit,author,action,eventName,ref,workflow | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEPLOY_BOT_WEBHOOK_URL }} | ||
if: always() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Live Release UI Kit Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
alpha-release-ui-kit-docs: | ||
if: "!contains(github.event.head_commit.message, '[skip ci]') && contains(github.event.head_commit.message, '(docs)')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: Set Git Configulations | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "lubycon" | ||
- name: Caching Node Modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install depedencies | ||
run: yarn | ||
- name: Build | ||
run: yarn workspace lubycon-ui-kit-docs build | ||
- name: Publish | ||
run: yarn workspace lubycon-ui-kit-docs deploy | ||
env: | ||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
ENV: 'live' | ||
- uses: 8398a7/action-slack@v3 # 슬랙 노티피케이션 | ||
with: | ||
status: ${{ job.status }} | ||
fields: repo,message,commit,author,action,eventName,ref,workflow | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEPLOY_BOT_WEBHOOK_URL }} | ||
if: always() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"presets": ["next/babel", "@emotion/babel-preset-css-prop"], | ||
"plugins": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ui-kit.alpha.lubycon.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ui-kit.lubycon.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/types/global" /> | ||
/// <reference types="@emotion/react/types/css-prop" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import App from 'next/app'; | ||
import 'normalize.css'; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1 @@ | ||
import React from 'react'; | ||
import Link from 'next/link'; | ||
import Layout from '../src/components/Layout'; | ||
|
||
const IndexPage = () => ( | ||
<Layout title="Home | Next.js + TypeScript Example"> | ||
<h1>Hello Next.js 👋</h1> | ||
<p> | ||
<Link href="/about"> | ||
<a>About</a> | ||
</Link> | ||
</p> | ||
</Layout> | ||
); | ||
|
||
export default IndexPage; | ||
export { default } from 'pages/HomePage'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const ghpages = require('gh-pages'); | ||
const path = require('path'); | ||
const fs = require('fs'); | ||
|
||
const env = process.env.ENV; | ||
const token = process.env.ACCESS_TOKEN; | ||
const deployTarget = env === 'alpha' ? 'ui-kit.alpha.lubycon.io' : 'ui-kit.lubycon.io'; | ||
|
||
console.log('📦 UI Kit 문서 알파 배포를 준비 중 입니다...'); | ||
|
||
console.log('🌱 CNAME 만드는 중...'); | ||
fs.renameSync(path.resolve(`./CNAME.${env}`), path.resolve('./out/CNAME')); | ||
console.log('🌱 CNAME 생성 완료'); | ||
|
||
ghpages.publish( | ||
path.join(__dirname, '../out'), | ||
{ | ||
branch: 'master', | ||
remote: 'origin', | ||
repo: `https://${token}@github.com/Lubycon/${deployTarget}`, | ||
message: `UI Kit 문서 배포`, | ||
}, | ||
(err) => { | ||
if (err) { | ||
throw err; | ||
} else { | ||
console.log('🚀 UI Kit 문서 알파 배포가 완료되었습니다!'); | ||
} | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react'; | ||
import { useRouter } from 'next/router'; | ||
|
||
const GlobalHeader = () => { | ||
const router = useRouter(); | ||
const handleLogoClick = (e: MouseEvent) => { | ||
e.preventDefault(); | ||
router.push('/'); | ||
}; | ||
|
||
return ( | ||
<nav | ||
css={{ | ||
display: 'flex', | ||
width: '100%', | ||
justifyContent: 'center', | ||
}} | ||
> | ||
<div | ||
css={{ | ||
display: 'flex', | ||
width: 1200, | ||
justifyContent: 'space-between', | ||
alignItems: 'center', | ||
padding: '12px 0', | ||
}} | ||
> | ||
<a href="/" onClick={handleLogoClick}> | ||
<img | ||
css={{ width: 100 }} | ||
src="https://d2x9jxyr47nlkc.cloudfront.net/logo/logo-color.svg" | ||
/> | ||
</a> | ||
</div> | ||
</nav> | ||
); | ||
}; | ||
|
||
export default GlobalHeader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import GlobalHeader from 'components/GlobalHeader'; | ||
import React from 'react'; | ||
|
||
const HomePage = () => { | ||
return ( | ||
<div> | ||
<GlobalHeader /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default HomePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ | |
] | ||
}, | ||
"allowJs": true | ||
// "jsxImportSource": "@emotion/react" | ||
}, | ||
"exclude": [ | ||
"./node_modules" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
ui-kit.alpha.lubycon.io | ||
ui-kit.storybook.lubycon.io |
Oops, something went wrong.