> For the complete documentation index, see [llms.txt](https://jirlong.gitbook.io/html/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jirlong.gitbook.io/html/appendix/deployment.md).

# Deployment

## github.io

* Instruction: <https://gitbook.tw/chapters/github/using-github-pages.html>
* Download github desktop <https://desktop.github.com/>

{% embed url="<https://www.loom.com/share/ce7d267e5e2540bc9853ce0093696e4b>" %}

### Step 1. Preparation

1. 準備好你已經做好的網頁（放在一個資料夾內）
2. 註冊github並得到你的username
3. 下載並安裝好github desktop（對新手來說比較好用）

### Step 2. Create a new repository *username.github.io*&#x20;

![](https://2277503657-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHpWM2qI66ASAuworLy%2F-MK9s5pLAYtX1BbwdMKe%2F-MK9sxlmHFrLcWFpSsDY%2Fimage.png?alt=media\&token=6d556175-b7b3-4dfd-b981-5774ac6cbe9c)

如果你的github帳號是abc，那你就要建立abc.github.io，首頁也就是<http://abc.github.io。依此類推。注意，應該要設定為public。>

![](https://2277503657-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHpWM2qI66ASAuworLy%2F-MK9s5pLAYtX1BbwdMKe%2F-MK9tGD7hpfy4xFbKE9Y%2Fimage.png?alt=media\&token=47dc64cf-8746-4fb3-beb7-821fa754e588)

### (Option) 建立另一個網頁

你不想要網頁擺在`username.github.io`而想要有別的網頁，實際上每個repository都可以是一個網站或網頁。你可以先產生一個repository（你喜歡的名字就好）。例如我就建立bt這個repository。這樣這個repository未來的網址就會是`username.github.io/bt/`。注意，應該要設定為public。

<div align="left"><img src="https://2277503657-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHpWM2qI66ASAuworLy%2F-MK9s5pLAYtX1BbwdMKe%2F-MK9u5REpa3iu5dwAchd%2Fimage.png?alt=media&amp;token=535b535e-8544-4a64-9193-410612d5abfc" alt=""></div>

### Step 3. 選擇在GitHub Desktop開啟

這麼做會在你的電腦所指定的資料夾中clone一個github repository。日後，你對該資料夾做的所有更新，放置檔案、修改檔案，都會被記錄下來等候commmit或push（上傳動作）。

![選Code可以選擇Open with GitHub Dekstop](https://2277503657-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHpWM2qI66ASAuworLy%2F-MK9s5pLAYtX1BbwdMKe%2F-MK9urtTW-z_NOC9r_FI%2Fimage.png?alt=media\&token=5049f2d9-29c4-4b5d-be6c-6795c0011778)

### Step 3.1 設定該repository在電腦中的位置

![上面是網址端、下方是Local端](https://2277503657-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHpWM2qI66ASAuworLy%2F-MK9s5pLAYtX1BbwdMKe%2F-MK9vDG5tXH6ola9O2nS%2Fimage.png?alt=media\&token=e5c989fd-7a71-46c1-b1be-9871984c12b4)

### Step 4. 將Local端已經設計好的網頁內容拖入github desktop所clone下來的資料夾

會發現GitHub Desktop上會顯示更新過的檔案。

![](https://2277503657-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHpWM2qI66ASAuworLy%2F-MK9s5pLAYtX1BbwdMKe%2F-MK9wHNX4JydC5nKWYVt%2Fimage.png?alt=media\&token=d24c5d4a-94eb-44cd-83d4-72bdfefd563b)

### Step 4.1. 寫Commit Summary

記得要寫commit summary才能夠commit。

![](https://2277503657-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHpWM2qI66ASAuworLy%2F-MK9s5pLAYtX1BbwdMKe%2F-MKA1KDTOWSpDfQ9-Q-J%2Fimage.png?alt=media\&token=349c611d-bf69-4af3-9bb6-36ec6351d809)

### Step 5. Commit -> Push

Commit是用來提交你所做的修改，要再Push出去才算是完成「上傳」到github repository。

![](https://2277503657-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHpWM2qI66ASAuworLy%2F-MK9s5pLAYtX1BbwdMKe%2F-MKA2okd-WsnIfCtxvpJ%2Fimage.png?alt=media\&token=b73778d9-c88f-464a-98a7-a6fda6ad775f)

### Step 6. Go to github to check your files

![](https://2277503657-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHpWM2qI66ASAuworLy%2F-MK9s5pLAYtX1BbwdMKe%2F-MKA3XuSaPBx4pR_zhzZ%2Fimage.png?alt=media\&token=c96ad573-52b9-456e-9e56-bf3681794d70)

### Step 7. 啟用該Repository的Github Pages

選擇該Repository的Settings，下拉找到Github Pages。

![](https://2277503657-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHpWM2qI66ASAuworLy%2F-MKA43MGx0WUwmIOKhua%2F-MKA4jY7li18dJ6waMoB%2Fimage.png?alt=media\&token=3a6e2648-260e-46d4-beec-748d52641b55)

![](https://2277503657-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHpWM2qI66ASAuworLy%2F-MKA43MGx0WUwmIOKhua%2F-MKA4t2PZWLZ4Ddi2Mk6%2Fimage.png?alt=media\&token=cce29867-51b6-4534-88d5-e8abbdd5578d)

###

### Step 7. Browse the page by

<https://jirlong.github.io/bt/bt.html> 因為首頁不是index.html，所以他不會自動讀到bt.html，因此要特別指定要bt目錄中的bt.html。 但如果首頁是index.html，那就只要給<https://jirlong.github.io/bt> 即可。會過一下才生效。不用太急著瀏覽

{% embed url="<https://jirlong.github.io/bt/bt.html>" %}

### Step 8. Modify filename

### Step 9. Pull modified files back to local computer

## homepage.ntu

* Instruction: <https://www.cc.ntu.edu.tw/chinese/services/serv_i01.asp>
* Upload unstruction: <http://jsc.cc.ntu.edu.tw/ntucc/homepage/>
* Download filezilla <https://filezilla-project.org/>
