Skip to content

Deployment failed with Exit code 128 #1626

Closed
@zbw182

Description

@zbw182

Describe the bug

Ran into this issue when updating our site and redeploying

Error: The deploy step encountered an error: There was an error creating the worktree: The process '/usr/bin/git' failed with exit code 128 ❌ ❌

Reproduction Steps

Merged in some changes, and the redeployment failed. We're most likely doing something silly here, but I'm not familiar enough with the how the deployment process works to see any obvious issues.

This line looks suspicious

fatal: 'master' is already used by worktree at '/home/runner/work/ota-analyzer/ota-analyzer'

Logs

Checking configuration and starting deployment… 🚦
Configuring SSH client… 🔑
Identity added: (stdin) (zhangkelvin@zhangkelvin-macbookpro.roam.corp.google.com)
Deploying using SSH Deploy Key… 🔑
Configuring git…
/usr/bin/git config user.name zhangxp1998
/usr/bin/git config user.email zhangxp1998@gmail.com
/usr/bin/git remote rm origin
/usr/bin/git remote add origin git@github.com:android/android.github.io
Git configured… 🔧
Starting to commit changes…
/usr/bin/git ls-remote --heads git@github.com:android/android.github.io refs/heads/master
e6f43fbe6c548418679eb0fea070c40b96978949 refs/heads/master
Creating worktree…
/usr/bin/git fetch --no-recurse-submodules --depth=1 origin master
From github.com:android/android.github.io

  • branch master -> FETCH_HEAD
  • [new branch] master -> origin/master
    /usr/bin/git worktree add --no-checkout --detach github-pages-deploy-action-temp-deployment-folder
    Preparing worktree (detached HEAD 717bdd3)
    /usr/bin/git checkout -B master origin/master
    fatal: 'master' is already used by worktree at '/home/runner/work/ota-analyzer/ota-analyzer'
    Running post deployment cleanup jobs… 🗑️
    /usr/bin/git checkout -B github-pages-deploy-action/nacfo11fk
    Switched to a new branch 'github-pages-deploy-action/nacfo11fk'
    /usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force
    Error: The deploy step encountered an error: There was an error creating the worktree: The process '/usr/bin/git' failed with exit code 128 ❌ ❌
    Deployment failed! ❌

::set-output name=deployment-status::failed

Workflow

name: Node.js CI

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

jobs:
build:

runs-on: ubuntu-latest

strategy:
  matrix:
    node-version: [16.x]
    # See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
  uses: actions/setup-node@v2
  with:
    node-version: ${{ matrix.node-version }}
    cache: 'npm'
- run: npm ci --force
- run: NODE_ENV=production npm run build --if-present
- name: Deploy to GitHub Pages
  uses: JamesIves/github-pages-deploy-action@4.1.5
  with:
    branch: 'master'
    folder: 'dist'
    ssh-key: '${{ secrets.SSH_KEY }}'
    clean: false
    repository-name: 'android/android.github.io'
    target-folder: 'analyseOTA'

Additional Comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐝This issue describes a bug.duplicate 💿This issue or pull request already existsversion 4Issues related to version 4 of this action.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions