LoginSignup
2
1

More than 5 years have passed since last update.

gitlab pagesのartifacts pathsはpublicじゃないとダメ

Posted at

問題

buildはpassしてるのに、なぜかdeployがfailedになる

gitlab-ci.yml
image: node

before_script:
  - npm install

cache:
  paths:
    - node_modules/

pages:
  stage: deploy
  script:
  - npm run build
  artifacts:
    paths:
    - dist
  only:
  - master

解決

ドキュメントを見直すとgitlab pagesのartifacts pathsはpublicじゃないとダメらしい
build後にmvして解決した

gitlab-ci.yml
image: node

before_script:
  - npm install

cache:
  paths:
    - node_modules/

pages:
  stage: deploy
  script:
  - npm run build
  - mv dist public
  artifacts:
    paths:
    - public
  only:
  - master

参考

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1