After trying a few ways I’m still at an impasse here. I have done the following:
-
Created a Deploy Key from my site
-
Copy the entire key, including the first line (
ssh-rsa
) as an SSH Key to my/settings/keys
as anSSH Key
Based on my reading of the original support guide, this should be all that’s necessary.
I thought it might be my build
command, but not sure why that would be. See my scripts in the package.json
"scripts": {
"build": "npm run pre-build && gatsby build",
"clean": "rm -rf .cache && rm -rf public",
"modules:update": "git submodule update --remote",
"pre-build": "npm run clean && npm run site-stats && npm run modules:update",
"site-stats": "cloc . --exclude-dir=$(tr '\n' ',' < .clocignore) --md > ./content/stats/current-stats.md",
},
Cloud Trigger Deploy Fails
When I make a commit, I trigger a build from my branch, but that fails. Here are two examples:
Local Build
When I build and deploy all locally, it works (not surprising):
stephen@Stephens-MBP-2 blog % ./node_modules/.bin/netlify build
┌─────────────────────────────┐
│ Netlify Build │
└─────────────────────────────┘
❯ Version
@netlify/build 3.3.4
❯ Flags
mode: cli
❯ Current directory
/Users/stephen/code/blog
❯ Config file
No config file was defined: using default values.
❯ Context
production
┌───────────────────────────────────┐
│ 1. Build command from Netlify app │
└───────────────────────────────────┘
$ npm run build
> stephencharlesweiss.com@0.1.0 build /Users/stephen/code/blog
> npm run pre-build && gatsby build
> stephencharlesweiss.com@0.1.0 pre-build /Users/stephen/code/blog
> npm run clean && npm run site-stats && npm run modules:update
> stephencharlesweiss.com@0.1.0 clean /Users/stephen/code/blog
> rm -rf .cache && rm -rf public
> stephencharlesweiss.com@0.1.0 site-stats /Users/stephen/code/blog
> cloc . --exclude-dir=$(tr '
' ',' < .clocignore) --md > ./content/stats/current-stats.md
> stephencharlesweiss.com@0.1.0 modules:update /Users/stephen/code/blog
> git submodule update --remote
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0
Unpacking objects: 100% (4/4), done.
From github.com:stephencweiss/digital-garden
0af15ab..52b31a7 master -> origin/master
Submodule path 'content': checked out '52b31a73126ab9180c6a267e739ba76a3abf65d3'
success open and validate gatsby-configs - 0.068s
success load plugins - 1.316s
warn The Google Analytics plugin requires a tracking ID. Did you mean to add it?
success onPreInit - 0.045s
success delete html and css files from previous builds - 0.005s
success initialize cache - 0.006s
success copy gatsby files - 0.045s
success onPreBootstrap - 0.008s
success createSchemaCustomization - 0.051s
success Checking for changed pages - 0.002s
success source and transform nodes - 3.174s
success building schema - 0.335s
success createPages - 1.353s
success Checking for changed pages - 0.001s
success createPagesStatefully - 0.093s
success update schema - 0.047s
success onPreExtractQueries - 0.001s
success extract queries from components - 0.315s
success write out redirect data - 0.004s
success Build manifest and related icons - 0.319s
success onPostBootstrap - 0.323s
info bootstrap finished - 10.284s
success run static queries - 0.222s - 4/4 18.04/s
warn code block or inline code language not specified in markdown. applying generic code block
warn unable to find prism language 'a ' for highlighting. applying generic code block
warn unable to find prism language 'brew <formula' for highlighting. applying generic code block
warn unable to find prism language 'console.log('my var --' for highlighting. applying generic code block
warn unable to find prism language 'proposal: standard --' for highlighting. applying generic code block
warn unable to find prism language 'el =' for highlighting. applying generic code block
warn unable to find prism language 'error: operator does not exist: text @' for highlighting. applying generic code block
warn unable to find prism language 'if (count ' for highlighting. applying generic code block
warn unable to find prism language '(state, action) =' for highlighting. applying generic code block
warn unable to find prism language 'psql -h <db host name' for highlighting. applying generic code block
warn unable to find prism language 'alter table <table_name' for highlighting. applying generic code block
warn unable to find prism language 'git checkout [<tree-ish' for highlighting. applying generic code block
warn unable to find prism language 'git checkout (-p|--patch) [<tree-ish' for highlighting. applying generic code block
warn unable to find prism language '.github/workflows/<action-name' for highlighting. applying generic code block
warn unable to find prism language '<database_name' for highlighting. applying generic code block
warn unable to find prism language 'nvm i 2' for highlighting. applying generic code block
warn unable to find prism language '2' for highlighting. applying generic code block
warn unable to find prism language 'vi' for highlighting. applying generic code block
warn unable to find prism language 'shell:tiile="gitlog --help"' for highlighting. applying generic code block
warn unable to find prism language 'shellcopy=true' for highlighting. applying generic code block
warn unable to find prism language 'major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id' for highlighting. applying generic
warn unable to find prism language 'article ' for highlighting. applying generic code block
warn unable to find prism language 'git rm --cached <file' for highlighting. applying generic code block
warn unable to find prism language 'git rm —cached <file' for highlighting. applying generic code block
warn unable to find prism language '256 / 1*2^7 ' for highlighting. applying generic code block
warn unable to find prism language 'txt' for highlighting. applying generic code block
warn unable to find prism language '(files) =' for highlighting. applying generic code block
warn unable to find prism language 'output' for highlighting. applying generic code block
warn unable to find prism language '/users/<your_username' for highlighting. applying generic code block
warn unable to find prism language 'go:' for highlighting. applying generic code block
warn unable to find prism language 'res.on('end', () =' for highlighting. applying generic code block
warn unable to find prism language 'title=histogram.txt' for highlighting. applying generic code block
warn unable to find prism language '~/.zshrc ' for highlighting. applying generic code block
success run page queries - 25.553s - 1907/1907 74.63/s
success write out requires - 0.020s
success Building production JavaScript and CSS bundles - 8.550s
success Rewriting compilation hashes - 0.004s
success Building static HTML for pages - 3.835s - 1907/1907 497.29/s
success Generating image thumbnails - 109.995s - 947/947 8.61/s
info Generated public/sw.js, which will precache 9 files, totaling 346430 bytes.
The following pages will be precached:
/offline-plugin-app-shell-fallback/index.html
success onPostBuild - 0.972s
info Done building in 121.865659168 sec
(build.command completed in 2m 7.7s)
┌─────────────────────────────┐
│ Netlify Build Complete │
└─────────────────────────────┘
(Netlify Build completed in 2m 7.7s)
stephen@Stephens-MBP-2 blog % ./node_modules/.bin/netlify deploy
Deploy path: /Users/stephen/code/blog/public
Deploying to draft URL...
✔ Finished hashing 4907 files
✔ CDN requesting 1986 files
✔ Finished uploading 1986 assets
✔ Draft deploy is live!
Logs: https://app.netlify.com/sites/code-comments/deploys/5f4bd003cff5d07af77c66d7
Website Draft URL: https://5f4bd003cff5d07af77c66d7--code-comments.netlify.app
If everything looks good on your draft URL, deploy it to your main site URL with the --prod flag.
netlify deploy --prod
Wrap
Any and all suggestions welcome and appreciated!