iT邦幫忙

0

Gulp 一鍵部屬到 Github Pages DAY93

在介紹 gulp-gh-pages 之前

我們必須先在 GitHub 上新增一個遠端數據庫
https://ithelp.ithome.com.tw/upload/images/20201124/20123039fcmVCvBtLS.jpg

點選 New repository

並在終端機

輸入

git remote add 遠端數據庫網址
git push origin master

會發現這時已經推上 GitHub

當然你要利用 git push origin master 也是可以

但我們也可以利用插件來執行

安裝

npm install --save gulp-gh-pages

輸入

gulp.task('deploy', function() {
    return gulp.src('./public/**/*')
    .pipe($.ghPages());
});

並輸入 gulp deploy
https://ithelp.ithome.com.tw/upload/images/20201124/20123039vtMCuC9bG4.jpg
分支 請選擇 gh-pages
若要看到你的網頁
點選 setting點選 settings
https://ithelp.ithome.com.tw/upload/images/20201124/20123039oudGDZiG31.jpg
就可以在此看到你的網頁啦~~
https://ithelp.ithome.com.tw/upload/images/20201124/20123039UFHjvQNFGv.png

那今天的介紹就到這裡
若有任何問題 或 內容有誤
都可以跟我說唷/images/emoticon/emoticon41.gif


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言