๐ย Ignite๋ Swift ๊ฐ๋ฐ์๋ค์ด Static Website๋ฅผ ๋ง๋๋๋ฐ ๋์์ ์ฃผ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๋๋ค.
์ ๋ ์ฃผ๊ฐํ๊ณ ๋ก๋ธ๋ก๊ทธ๋ฅผ ๋์ผํ ๊ธฐ๋ฅ์ธ ๐ย Publish ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ฌ์ฉํด์ ๊ด๋ฆฌ์ค์ด์์ต๋๋ค.
ํ์ง๋ง Publish๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ ์ปค์คํ ์ ์์ ๋กญ๊ฒ ํ๊ธฐ์๋ HTML, CSS ์ฝ๋์ ๋ํ ์ง์์ด ํ์ํ์ง๋ง Ignite๋ SwiftUIํ์์ผ๋ก ์์ฑํด์ ๋งค์ฐ ๊ฐํธํ๊ณ ์ง๊ด์ ์ด์ฌ์ ๋ณ๊ฒฝ์ ๊ฒฐ์ฌํ์ต๋๋ค.
Ignite์ ์ฌ์ฉ๋ฒ์ ๊ฐ๋จํ์ต๋๋ค. CLI๋ฅผ ์ค์นํ ํ ๐ย Sample Site๋ฅผ ์ฐธ๊ณ ํ์ฌ ์ฃผ์ด์ง Component๋ค์ ์กฐํฉํ์ฌ UI๋ฅผ ๊ตฌํํ ์ ์์ต๋๋ค.
Package๋ฅผ ๋น๋ํ๊ฒ ๋๋ฉด Build ํด๋๊ฐ ์์ฑ๋๋๋ฐ ํด๋น ํด๋๋ด๋ถ์ ํ์ผ๋ค์ ๋ฐฐํฌํ๋ฉด Static Website๊ฐ ์์ฑ๋ฉ๋๋ค.
์ ๋ ๋ฐ๋ก ์์ค์ฝ๋๋ฅผ ๊ด๋ฆฌํ๋ ๋ฆฌํฌ์งํ ๋ฆฌ๋ฅผ ๋ง๋ ํ Github action์ ์ฌ์ฉํ์ฌ github.io ๋ฆฌํฌ์งํ ๋ฆฌ๋ก Build ํด๋ ๋ด๋ถํ์ผ๋ค์ ์ ๋ฌํ๋๋ก ๊ตฌํํ์ต๋๋ค.
Ignite์๋ ContentPreview๋ผ๋ Component๋ฅผ ์ ๊ณต ์ค์ธ๋ฐ ์ปค์คํ ์ด ๋ถ๊ฐ๋ฅํด์ ์ปค์คํ ์ด ๊ฐ๋ฅํ๋๋ก ํด๋ก์ ๋ฅผ ์ ๋ฌ๋ฐ๋๋ก ์คํ์์ค๋ฅผ ์์ ํ๋๋ฐ PR ๋ฆฌ๋ทฐ๋ฅผ ๋ฐ๊ณ ์์ ์๋ก ์ ๋ฌ๋ฐ๋๋ก ๊ตฌํ๋ฐฉ์์ ์ ์๋ฐ์์ ์ฌ์์ ํ์ต๋๋ค.
๐ย Github Docs - ์ฌ๋ฌ ๊ณ์ ๊ด๋ฆฌ
ํ๋์ ๊ธฐ๊ธฐ์์ Github์ ์ฌ๋ฌ ๊ณ์ ์ ๊ด๋ฆฌํ๊ธฐ ์ํด์๋ HTTPS ๋ฐฉ์์์ ๋ฐ๋ก ์ฒ๋ฆฌ๋ฅผ ์ถ๊ฐํด์ผ๋ฉ๋๋ค.
HTTPS ๋ฐฉ์์์ ๋ฆฌํฌ์งํ ๋ฆฌ๋ณ๋ก Github Token์ ์ธ์ฆ๋ฐ๋๋กํ๋ฉด ๊ณ์ ๋ณ๋ก๊ฐ ์๋ ๋ฆฌํฌ์งํ ๋ฆฌ๋ณ๋ก ์ธ์ฆ์ ํ๊ธฐ ๋๋ฌธ์ ํด๊ฒฐ๋์ง๋ง ํค์ฒด์ธ์ ์ฌ๋ฌ๊ฐ๊ฐ ์์ด๊ฒ ๋๊ณ ๋ฆฌํฌ์งํ ๋ฆฌ๋ณ๋ก ๋งค๋ฒ ์ธ์ฆํด์ผํด์ ๋ฒ๊ฑฐ๋กญ๊ธฐ ๋๋ฌธ์ SSH๋ฐฉ์์ ์ฌ์ฉํ๋ ๊ฒ์ด ๋์ ๊ฒ ๊ฐ์ต๋๋ค.
HTTPS ๋ฐฉ์ ์ฌ๋ฌ ๊ณ์ ๊ด๋ฆฌ
$ git config --get credential.helper
# Enter
$ git credential-osxkeychain erase
host=github.com
protocol=https
$ git config --global credential.https://github.com.useHttpPath true
SSH ๋ฐฉ์ ์ฌ๋ฌ ๊ณ์ ๊ด๋ฆฌ
# ๊ฐ ๊ณ์ ๋ง๋ค SSH ํค ์์ฑ
$ ssh-keygen -t ed25519 -C "your_email@example.com"
# SSH์ค์ ํ์ผ ์์ฑ
$ ~/.ssh/config
#############
Host github-personal
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519_personal
Host github-work
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519_work
#############
# ๊ฐ ๋ฆฌํฌ์งํ ๋ฆฌ๋ง๋ค ๋ค๋ฅธ ํธ์คํธ ์ด๋ฆ์ ์ฌ์ฉํ์ฌ ํด๋ก
git clone git@github-personal:username/repo.git
git clone git@github-work:username/repo.git