Skip to content

Commit

Permalink
GitLab yarn -> npm
Browse files Browse the repository at this point in the history
  • Loading branch information
giladronat committed Mar 24, 2018
1 parent 2d84557 commit af6d731
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/docs/deploy-gatsby.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ cache:
pages:
script:
- yarn install
- npm install
- ./node_modules/.bin/gatsby build --prefix-paths
artifacts:
paths:
Expand All @@ -181,14 +181,14 @@ in between builds, so subsequent builds should be a lot faster as it doesn't hav
to reinstall all the dependancies required. `pages:` is the name of the
CI stage. You can have multiple stages, e.g. 'Test', 'Build', 'Deploy' etc.
`script:` starts the next part of the CI stage, telling it to start running the
below scripts inside the image selected. We have used the `yarn install` and
below scripts inside the image selected. We have used the `npm install` and
`./node_modules/.bin/gatsby build --prefix-paths` which will install all dependancies, and
start the static site build, respectively.

We have used
`./node_modules/.bin/gatsby build --prefix-paths` because we then don't have to install
gatsby-cli to build the image, as it has already been included and installed
with `yarn install`. We have included `--prefix-paths` as when running the command _without_ that flag, Gatsby ignores your pathPrefix. `artifacts:` and `paths:` are used to tell GitLab pages
with `npm install`. We have included `--prefix-paths` as when running the command _without_ that flag, Gatsby ignores your pathPrefix. `artifacts:` and `paths:` are used to tell GitLab pages
where the static files are kept. `only:` and `master` tells the CI to only run
the above instructions when the master branch is deployed.

Expand Down

0 comments on commit af6d731

Please sign in to comment.