W12 上課直播 << 
Previous Next >> gitlab-ssh
W13 Gitlab建立
測試人員:40823245
注:由於40823245的github被封,故由組員代替push。
gitlab步驟影片版本(用stage2-bg1做示範)
username:40823245
email:40823245@gm.nfu.edu.tw
新增空的倉儲


輸入要同步過來的倉儲名稱(我用stage3-bg1當例子)
下面勾公開和不要有內建(空倉儲)

建完會看到下圖

在對應的資料夾輸入git branch確認主分支

如果無yml檔就建立,有yml檔就改(master→main)

yml程式碼(檔名要存yml)
| 
 1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
 | 
pages: 
  stage: deploy 
  script: 
  - mkdir .public 
  - cp -r * .public 
  - mv .public public 
  artifacts: 
    paths: 
    - public 
  only: 
  - main 
variables: 
  GIT_SUBMODULE_STRATEGY: recursive 
 
 | 
 
 
推推看

再檢查一次主分支
git remote到gitlab
| 
 1 
 | 
git remote add gitlab https://gitlab.com/40823245/stage3-bg1.git 
 
 | 
 
 
推到gitlab

可以看到gitlab為下圖

commit紀錄都在

到設定找到gitlab同步後的網址

若沒顯示下圖請重整頁面,它需要時間轉

點連結可看到同步的頁面和網址

W12 上課直播 << 
Previous Next >> gitlab-ssh