"No Rakefile found" trying to deploy to GH Pages despite not using rake

I’m working on deploying a simple jekyll file to github pages. I feel like I’ve followed the instructions for the GH pages provider, but in the relevant job stage, I’m getting a missing rakefile error:

$ bundle exec rake
255rake aborted!
256No Rakefile found

I don’t see anything about any expectations of there being a rakefile required, but I might just be missing something.

jobs:
  include:
    - stage: build
      install: 
        - nvm install 14.17.4
        - nvm use 14.17.4
        - bundle install
        - yarn install
      script:
        - bundle exec jekyll build
    - stage: continuous_delivery
      deploy:
        provider: pages
        skip_cleanup: true
        github_token: $GITHUB_TOKEN  # Set in the settings page of your repository, as a secure variable
        keep_history: true

stages:
  - name: build
    if: tag IS NOT present
  - name: continuous_delivery
    if: tag IS NOT PRESENT

I see a few mentions of similar errors elsewhere, but nothing that really tells me what’s happening here. Can someone point me in the right direction?

- stage: continuous_delivery <etc> defines another job, run in another VM, with its own install and script phases. You didn’t specify them so they remain the defaults for the selected language: (which defaults to ruby), bundle exec rake being one of them.

If you need to deploy after building, you don’t need to create another job for that, just place the deploy: clause into the same job that does the build.

2 Likes

2 posts were split to a new topic: Build then deploy to development | staging | production

Imprint