The react project I am working on does not use a public folder but some prompts in the .gitlab-ci.yml file – need help understandig the pipeline

I was given a template to work with that I can modify but I lack the necessary understanding about the pipeline.
If anyone has the time, I would appreciate (also partial) explanations how the pipeline constructs the public folder and how I could change the project so I can put other files in the public folder, too.
I want to put a js file into the public folder in case that is relevant.
The project is currently structured like this:

├── README.md                       -> The file you are currently reading
├── index.html                      -> Single HTML file for the wiki
├── package.json                    -> Manages project metadata and dependencies
├── src/
│   ├── components/                 -> Components (Like Navbar, Timelines, ...)
│   ├── App/                        -> Main React application container
|   |     └── App.tsx
│   ├── contents/                   -> Page components for the website
│   │   └── *.tsx                   
│   ├── main.tsx                    -> Entry point of the wiki application
│   ├── pages.ts                    -> Page definition and path mapping
│   ├── utils/                      -> Utility functions
│   └── vite-env.d.ts               -> TypeScript definitions for Vite
├── tsconfig.json                   -> Configures TypeScript options
├── tsconfig.node.json              -> TypeScript settings for Node.js
├── vite.config.ts                  -> Configuration for the Vite tool
└── yarn.lock                       -> Yarn lock file for dependency management

This is the .gitlab-ci.yml file:

image: node:18.20.0

build:
  stage: build
  cache:
    - key:
        files:
          - yarn.lock
      paths:
        - .yarn-cache/
  before_script:
    - echo 'yarn-offline-mirror ".yarn-cache/"' >> .yarnrc
    - echo 'yarn-offline-mirror-pruning true' >> .yarnrc
    - yarn install --frozen-lockfile
  script:
    - yarn build
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH

pages:
  stage: build
  cache:
    - key:
        files:
          - yarn.lock
      paths:
        - .yarn-cache/
  before_script:
    - echo 'yarn-offline-mirror ".yarn-cache/"' >> .yarnrc
    - echo 'yarn-offline-mirror-pruning true' >> .yarnrc
    - yarn install --frozen-lockfile
  script:
    - yarn build
    - cp -a dist/. public/
    - echo '/* /index.html 200' > public/_redirects
  artifacts:
    paths:
      - public
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

I read a few articles and basic instructions about pipelines, gitlab CI, vite and yarn. Unfortunately for me, this is not a very basic pipeline and it seems like it is always assumed that it is clear what expressions such as p -a in the yml file mean.

Using the classic “delete something and see what errors arise to figure out its purpose” approach, I figured out that - echo '/* /index.html 200' > public/_redirects makes all links to files in the public folder go to the index.html page (I think…).

And that cp -a dist/. public/ is necessary to find all the files to build the website with.
Therefore, I tried putting the js file into the project structure as follows

├── README.md                       -> The file you are currently reading
├── mapscript.js
├── index.html                      -> Single HTML file for the wiki

Alas, that did not lead to it being found.

New contributor

user24890768 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật