Hi!
Background
We currently deploy one of react apps to Netlify using the netlify-cli package in a Github Action. The action step has been working fine with the following for some months.
// GitHub action step
name: Deploy to Netlify run: npm run ci-deploy-netlify -- --site ${{ env.NETLIFY_SITE_ID }} --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} --message "${{ env.RELEASE_ID }} - GitHub actions deploy - ${{ github.action }}
// NPM script (package.json)
"ci-deploy-netlify": "netlify deploy --dir=build --prod"
We also set the NETLIFY_SITE_ID environment variable to the site ID we are deploying to. We deploy the same repo to multiple Netlify sites (test, staging, prod) and switch the site ID in this way. We have been using “netlify-cli”: “2.53.0”.
The issue
Seemingly out of the blue (yesterday 8/9/2020), our deploys now hang indefinitely in the final stage of this process with the message “waiting for deploy to go live” (See full logs at the bottom).
Possible clue
Trying to deploy by running
npx netlify deploy -d "build" --prod --site "${{ env.NETLIFY_SITE_ID }}" --auth "${{ secrets.NETLIFY_AUTH_TOKEN }}" --message "${{ env.RELEASE_ID }} - GitHub actions deploy - ${{ github.action }}"
locally has the same hanging issue. However, if we first run npx netlify link -id SITE_ID
and then run the deploy script it seems to work for several times. This will also allow it to deploy to site by setting the --site flag to a different ID than the one linked. However, this only seems to work intermittently and sometimes takes a few unlinks and relinks to work. We are not able to run netlify link as part of our Github Action (as far as we can tell) as this requires browser authentication. However, we can see the NETLIFY_SITE_ID env is still being set, as before.
Logs
2020-09-08T00:16:06.5250509Z > DEBUG=* netlify deploy --dir=build --prod "--site" "SITE_ID" "--auth" "***" "--message" "GitHub actions deploy - run7"
2020-09-08T00:16:06.5250945Z
2020-09-08T00:16:06.6189840Z 2020-09-08T00:16:06.617Z @oclif/config reading core plugin /home/runner/work/REPO_NAME/REPO_NAME/node_modules/netlify-cli
2020-09-08T00:16:06.6191321Z 2020-09-08T00:16:06.618Z @oclif/config loadJSON /home/runner/work/REPO_NAME/REPO_NAME/node_modules/netlify-cli/package.json
2020-09-08T00:16:06.6217590Z 2020-09-08T00:16:06.621Z @oclif/config loadJSON /home/runner/work/REPO_NAME/REPO_NAME/node_modules/netlify-cli/oclif.manifest.json
2020-09-08T00:16:06.6223728Z 2020-09-08T00:16:06.622Z @oclif/config:netlify-cli using manifest from /home/runner/work/REPO_NAME/REPO_NAME/node_modules/netlify-cli/oclif.manifest.json
2020-09-08T00:16:06.6233253Z 2020-09-08T00:16:06.623Z @oclif/config reading user plugins pjson /home/runner/.local/share/netlify-cli/package.json
2020-09-08T00:16:06.6234499Z 2020-09-08T00:16:06.623Z @oclif/config loadJSON /home/runner/.local/share/netlify-cli/package.json
2020-09-08T00:16:06.6254848Z 2020-09-08T00:16:06.623Z @oclif/config loading plugins [
2020-09-08T00:16:06.6255545Z '@oclif/plugin-not-found',
2020-09-08T00:16:06.6256186Z '@oclif/plugin-plugins',
2020-09-08T00:16:06.6256789Z '@oclif/plugin-help'
2020-09-08T00:16:06.6257205Z ]
2020-09-08T00:16:06.6258210Z 2020-09-08T00:16:06.625Z @oclif/config loadJSON /home/runner/work/REPO_NAME/REPO_NAME/node_modules/netlify-cli/package.json
2020-09-08T00:16:06.6259390Z 2020-09-08T00:16:06.625Z @oclif/config loadJSON /home/runner/work/REPO_NAME/REPO_NAME/node_modules/netlify-cli/package.json
2020-09-08T00:16:06.6260620Z 2020-09-08T00:16:06.625Z @oclif/config loadJSON /home/runner/work/REPO_NAME/REPO_NAME/node_modules/netlify-cli/package.json
2020-09-08T00:16:06.6267360Z 2020-09-08T00:16:06.626Z @oclif/config loadJSON /home/runner/work/REPO_NAME/REPO_NAME/node_modules/package.json
2020-09-08T00:16:06.6270573Z 2020-09-08T00:16:06.626Z @oclif/config loadJSON /home/runner/work/REPO_NAME/REPO_NAME/node_modules/package.json
2020-09-08T00:16:06.6272625Z 2020-09-08T00:16:06.627Z @oclif/config reading core plugin /home/runner/work/REPO_NAME/REPO_NAME/node_modules/@oclif/plugin-not-found
2020-09-08T00:16:06.6274026Z 2020-09-08T00:16:06.627Z @oclif/config loadJSON /home/runner/work/REPO_NAME/REPO_NAME/node_modules/@oclif/plugin-not-found/package.json
2020-09-08T00:16:06.6275147Z 2020-09-08T00:16:06.627Z @oclif/config loadJSON /home/runner/work/REPO_NAME/REPO_NAME/node_modules/package.json
2020-09-08T00:16:06.6281517Z 2020-09-08T00:16:06.627Z @oclif/config reading core plugin /home/runner/work/REPO_NAME/REPO_NAME/node_modules/@oclif/plugin-help
2020-09-08T00:16:06.6286543Z 2020-09-08T00:16:06.627Z @oclif/config loadJSON /home/runner/work/REPO_NAME/REPO_NAME/node_modules/@oclif/plugin-help/package.json
2020-09-08T00:16:06.6287763Z 2020-09-08T00:16:06.628Z @oclif/config reading core plugin /home/runner/work/REPO_NAME/REPO_NAME/node_modules/@oclif/plugin-plugins
2020-09-08T00:16:06.6288458Z 2020-09-08T00:16:06.628Z @oclif/config loadJSON /home/runner/work/REPO_NAME/REPO_NAME/node_modules/@oclif/plugin-plugins/package.json
2020-09-08T00:16:06.6298657Z 2020-09-08T00:16:06.629Z @oclif/config loadJSON /home/runner/work/REPO_NAME/REPO_NAME/node_modules/@oclif/plugin-not-found/oclif.manifest.json
2020-09-08T00:16:06.6372550Z 2020-09-08T00:16:06.634Z @oclif/config loadJSON /home/runner/work/REPO_NAME/REPO_NAME/node_modules/@oclif/plugin-help/oclif.manifest.json
2020-09-08T00:16:06.6387721Z 2020-09-08T00:16:06.637Z @oclif/config loadJSON /home/runner/work/REPO_NAME/REPO_NAME/node_modules/@oclif/plugin-plugins/oclif.manifest.json
2020-09-08T00:16:06.6388907Z 2020-09-08T00:16:06.638Z @oclif/config:@oclif/plugin-not-found using manifest from /home/runner/work/REPO_NAME/REPO_NAME/node_modules/@oclif/plugin-not-found/oclif.manifest.json
2020-09-08T00:16:06.6389852Z 2020-09-08T00:16:06.638Z @oclif/config:@oclif/plugin-help using manifest from /home/runner/work/REPO_NAME/REPO_NAME/node_modules/@oclif/plugin-help/oclif.manifest.json
2020-09-08T00:16:06.6390657Z 2020-09-08T00:16:06.638Z @oclif/config:@oclif/plugin-plugins using manifest from /home/runner/work/REPO_NAME/REPO_NAME/node_modules/@oclif/plugin-plugins/oclif.manifest.json
2020-09-08T00:16:06.6391174Z 2020-09-08T00:16:06.638Z @oclif/config config done
2020-09-08T00:16:06.6396126Z 2020-09-08T00:16:06.639Z @oclif/config start init hook
2020-09-08T00:16:06.8191829Z 2020-09-08T00:16:06.818Z netlify:netlify-cli:hooks:init start /home/runner/work/REPO_NAME/REPO_NAME/node_modules/netlify-cli/src/hooks/init
2020-09-08T00:16:06.8643545Z 2020-09-08T00:16:06.864Z netlify:netlify-cli:hooks:init done
2020-09-08T00:16:06.8645283Z 2020-09-08T00:16:06.864Z @oclif/config init hook done
2020-09-08T00:16:06.8655696Z 2020-09-08T00:16:06.865Z netlify init version: @oclif/command@1.6.1 argv: [ 'deploy', '--dir=build', '--prod', '--site', 'SITE_ID', '--auth', '***', '--message', 'GitHub actions deploy - run7' ]
2020-09-08T00:16:06.8701777Z 2020-09-08T00:16:06.869Z @oclif/config runCommand deploy [ '--dir=build', '--prod', '--site', 'SITE_ID', '--auth', '***', '--message', 'GitHub actions deploy - run7' ]
2020-09-08T00:16:06.8713604Z 2020-09-08T00:16:06.870Z @oclif/config:netlify-cli require /home/runner/work/REPO_NAME/REPO_NAME/node_modules/netlify-cli/src/commands/deploy.js
2020-09-08T00:16:07.4713616Z 2020-09-08T00:16:07.471Z @oclif/config start prerun hook
2020-09-08T00:16:07.4714740Z 2020-09-08T00:16:07.471Z @oclif/config prerun hook done
2020-09-08T00:16:07.6537925Z 2020-09-08T00:16:07.653Z @oclif/config start analytics hook
2020-09-08T00:16:07.6541352Z 2020-09-08T00:16:07.653Z netlify:netlify-cli:hooks:analytics start /home/runner/work/REPO_NAME/REPO_NAME/node_modules/netlify-cli/src/hooks/analytics
2020-09-08T00:16:07.6549918Z 2020-09-08T00:16:07.654Z netlify:netlify-cli:hooks:analytics done
2020-09-08T00:16:07.6552190Z 2020-09-08T00:16:07.654Z @oclif/config analytics hook done
2020-09-08T00:16:07.7637317Z Deploy path: /home/runner/work/REPO_NAME/REPO_NAME/build
2020-09-08T00:16:07.7639239Z Deploying to main site URL...
2020-09-08T00:16:07.7655409Z - Hashing files...
2020-09-08T00:16:07.9010360Z ✔ Finished hashing 180 files
2020-09-08T00:16:07.9011548Z - CDN diffing files...
2020-09-08T00:16:08.1155853Z ✔ CDN requesting 10 files
2020-09-08T00:16:08.1159790Z - Uploading 10 files
2020-09-08T00:16:13.2946110Z ✔ Finished uploading 10 assets
2020-09-08T00:16:13.2946714Z - Waiting for deploy to go live...
2020-09-08T00:36:13.2971244Z Warning:
2020-09-08T00:36:13.2971485Z {
2020-09-08T00:36:13.2971655Z "name": "TimeoutError"
2020-09-08T00:36:13.2971806Z }
2020-09-08T00:36:13.2971884Z
2020-09-08T00:36:13.2972762Z at Object.warn (/home/runner/work/REPO_NAME/REPO_NAME/node_modules/@oclif/errors/lib/index.js:33:15)
2020-09-08T00:36:13.2973278Z at DeployCommand.warn (/home/runner/work/REPO_NAME/REPO_NAME/node_modules/@oclif/command/lib/command.js:57:16)
2020-09-08T00:36:13.2973798Z at DeployCommand.run (/home/runner/work/REPO_NAME/REPO_NAME/node_modules/netlify-cli/src/commands/deploy.js:227:16)
2020-09-08T00:36:13.3244196Z TimeoutError: Promise timed out after 1200000 milliseconds
2020-09-08T00:36:13.3245027Z at Timeout._onTimeout (~/work/REPO_NAME/REPO_NAME/node_modules/p-timeout/index.js:34:63)
2020-09-08T00:36:13.3380366Z npm ERR! code ELIFECYCLE
2020-09-08T00:36:13.3382096Z npm ERR! errno 2
2020-09-08T00:36:13.3384149Z npm ERR! REPO_NAME@0.1.0 ci-deploy-netlify: `DEBUG=* netlify deploy --dir=build --prod "--site" "SITE_ID" "--auth" "***" "--message" "GitHub actions deploy - run7"`
2020-09-08T00:36:13.3384476Z npm ERR! Exit status 2
2020-09-08T00:36:13.3384654Z npm ERR!
2020-09-08T00:36:13.3385275Z npm ERR! Failed at the REPO_NAME@0.1.0 ci-deploy-netlify script.
2020-09-08T00:36:13.3385766Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-09-08T00:36:13.3404377Z
2020-09-08T00:36:13.3406974Z npm ERR! A complete log of this run can be found in:
2020-09-08T00:36:13.3408689Z npm ERR! /home/runner/.npm/_logs/2020-09-08T00_36_13_336Z-debug.log
2020-09-08T00:36:13.3436151Z ##[error]Process completed with exit code 2.
2020-09-08T00:36:13.3473201Z ##[group]Run deliverybot/deployment-status@master
2020-09-08T00:36:13.3473493Z with:
2020-09-08T00:36:13.3473619Z state: failure
2020-09-08T00:36:13.3474403Z token: ***
2020-09-08T00:36:13.3474542Z env:
2020-09-08T00:36:13.3475484Z NETLIFY_SITE_ID: SITE_ID
(other environment variables omitted)