Mở bảng điều khiển Gitlab của bạn.


fcaj-book-store-frontend tại Project name.


Tải mã nguồn lên dự án fcaj-book-store-frontend trên Gitlab.
Đi đến thư mục gốc của dự án FCAJ_Workshop-Serverless mà bạn đã tải xuống trước đó.
Mở src/config.js, thay đổi giá trị của APP_API_URL thành Invoke URL mà bạn đã ghi lại trong bước Tạo pipeline SAM.

Tiếp theo, tạo một tệp mới có tên buildspec.yml tại thư mục gốc của dự án FCAJ_Workshop-Serverless như mã sau.
version: 0.2
phases:
install:
runtime-versions:
nodejs: 20.9.0
commands:
- npm install -g yarn
pre_build:
commands:
- echo Removing lock files...
- rm -f package-lock.json
- rm -f yarn.lock
build:
commands:
- echo Build started on `date`
- yarn install
- yarn build
artifacts:
base-directory: build
files:
- "**/*"
discard-paths: no

Tại trang dự án GitLab, nhấp vào tab HTTPS để lấy URL kho lưu trữ.

Chạy mã dưới đây trong terminal của bạn tại thư mục gốc của dự án FCAJ_Workshop-Serverless.
rm -rf .git
git init
git remote add origin https://gitlab.com/<your-username>/fcaj-book-store-frontend.git
git add .
git commit -m "Initial commit"

Đẩy mã nguồn lên nhánh master.
git push --set-upstream origin master

Quay lại dự án fcaj-book-store-frontend trên Gitlab. Bạn có thể thấy mã đã được tải lên.
