-
-
Save josephrace/719bfc7e40f632fd7aa3940ef1ede59e to your computer and use it in GitHub Desktop.
image: node:7.9.0 # change to match your node version | |
cache: | |
paths: | |
- node_modules/ | |
before_script: | |
- npm install | |
test: | |
stage: test | |
script: | |
- CI=true npm test | |
pages: | |
stage: deploy | |
script: | |
- CI=true npm run build | |
- rm -rf public | |
- mv build public | |
artifacts: | |
paths: | |
- public # GitLab pages serve from a 'public' directory | |
only: | |
- master # run on master branch |
check here how to deploy to Gitlab pages: https://www.gatsbyjs.org/docs/deploying-to-gitlab-pages/#deploying-to-gitlab-pages
check here how to deploy to Gitlab pages: https://www.gatsbyjs.org/docs/deploying-to-gitlab-pages/#deploying-to-gitlab-pages
@AbhimanyuAryan why you're telling irrelevant answer to the public. Understand the question first !
This problem happens because CRA is not aware the URL is relative (because it's prefixed by project name). Adding "homepage": ".",
to package.json
will make it relative to index.html and fix the problem.
This problem happens because CRA is not aware the URL is relative (because it's prefixed by project name). Adding
"homepage": ".",
topackage.json
will make it relative to index.html and fix the problem.
Thanks!
This problem happens because CRA is not aware the URL is relative (because it's prefixed by project name). Adding
"homepage": ".",
topackage.json
will make it relative to index.html and fix the problem.
Totally saved me
I'm also trying this approach but get
and
404
for the script the css and the favicon