question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Github Actions deployment error

See original GitHub issue

🐛 Bug Report

(A clear and concise description of what the bug is) Following the guidelines of GitHub Actions deployment here: https://v2.docusaurus.io/docs/deployment/#deploy The actions fail to build and deploy the site with this error:

 Release to GitHub Pages5s
##[error]Process completed with exit code 1.
Run git config --global user.email "actions@gihub.com"
npm ERR! cipm can only install packages with an existing package-lock.json or npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or later to generate it, then try again.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2020-05-30T17_04_14_260Z-debug.log
##[error]Process completed with exit code 1.

To Reproduce

  1. Added contents of documentation.yml from https://v2.docusaurus.io/docs/deployment/#deploy to file .github/workflows/documentation.yml in documentation branch of repository
  2. Followed the instructions to generate/deploy ssh key and secret

Expected behavior

successfully build the site and deploy to branch gh-pages

Actual Behavior

The actions fail to build and deploy the site with this error:

 Release to GitHub Pages5s
##[error]Process completed with exit code 1.
Run git config --global user.email "actions@gihub.com"
npm ERR! cipm can only install packages with an existing package-lock.json or npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or later to generate it, then try again.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2020-05-30T17_04_14_260Z-debug.log
##[error]Process completed with exit code 1.

Your Environment

  • Docusaurus version used: 2.0.0-alpha.56
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Node v14.2.0
  • Operating system and version (desktop or mobile): Desktop Arch Linux

Reproducible Demo

https://github.com/pdimens/PopGen.jl/tree/documentation/.github/workflows

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
stevenguhcommented, Sep 13, 2020

This an example github action that I am using to deploy to gh pages with peaceiris/actions-gh-pages. This action works fine without a new deploy ssh key.

name: deploy

on:
  pull_request:
    branches: [master]
  push:
    branches: [master]

jobs:
  checks:
    if: github.event_name != 'push'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: '12.x'
      - name: Test Build
        run: |
          if [ -e yarn.lock ]; then
          yarn install --frozen-lockfile
          elif [ -e package-lock.json ]; then
          npm ci
          else
          npm i
          fi
          npm run build
  gh-release:
    if: github.event_name != 'pull_request'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: '12.x'
      - name: Build
        run: |
          if [ -e yarn.lock ]; then
          yarn install --frozen-lockfile
          elif [ -e package-lock.json ]; then
          npm ci
          else
          npm i
          fi
          npm run build
      - name: Release to GitHub Pages
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./build
1reaction
pdimenscommented, Jun 12, 2020

@anshulrgoyal to follow up, I tried to see if it would make a difference to set up an SSH key for actions@github.com rather than the email account associated with my github account, and that seemed to do the trick. I pushed a minor commit and GitHub Actions finally ran the job successfully. If what I did was the the correct method all along, I recommend adding the specificity in the docusaurus deploy docs of creating an SSH key for actions@github.com .

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub Actions Deployment "Error! Could not find deployment"
I always get the following error when trying to deploy using Github Actions. Vercel CLI 23.1.2 Error! Could not find deployment Error!
Read more >
GitHub Actions failed to deploy my site to GitHub Pages #22028
Tried setting up a GitHub action to build and publish my site automatically but it keeps failing when it's being deployed by actions/deploy- ......
Read more >
Deploy request keep fails with 400 error. #25 - GitHub
About few hours ago, I tried to change my pages. After several pull requests, the deploying process suddenly failed and it keeps failing...
Read more >
Build errors during deployment to GitHub Pages · Issue #209
I am failed to deploy the ai-folio theme in my personal repository. Even I don't find any fruitful reason why it is happening....
Read more >
Deployment Status · Actions · GitHub Marketplace
Action inputs ; state, The state to set the deployment to. Must be one of the below: "error" "failure" "inactive" "in_progress" "queued" "pending"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found