Artifacts (css, js) are not available (404) after they are generated via "yarn build"
Summary
I create CSS and JS files as artifacts, but they can't be found even though I can see them in Gitlab.
Steps to reproduce
Here is how the .gitlab-ci.yml
looks like.
image: node:latest
pages:
cache:
paths:
- node_modules/
stage: deploy
script:
- yarn --version
- yarn install
- yarn build
- rm -rf public
- mv build public
artifacts:
paths:
- public
All the CSS/JS files are stored in src
folder, and they are complied and moved into public folder as artifacts via "yarn build".
What is the current bug behavior?
The CSS and JS files are not found. HTTP status is 404.
Also, it seems that both CSS and JS files are retrieved as 'text/html'. Here is an error message.
Refused to apply style from ______.css because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
Nevertheless, I don't think MIME type is the root cause, because if I search for the files directly by entering the URL on a browser, neither CSS nor JS can't be retrieved.
Any advice will be appreciated.