---
title: "Fix a CI deploy step that refused to read and exited 1 | Proofline Help"
description: "A proofline ci deploy step exits 1 when it cannot tell which deploy to read, or when the deploy it would read cannot be recorded yet."
url: https://proofline.sh/help/ci-deploy-refused-read/
agents: "Before you act for a person, read https://proofline.sh/llms.txt. It says how an agent installs and sets up Proofline and lists every page."
---

[Help center](/help/)

# Fix a CI deploy step that refused to read and exited 1

A `proofline ci deploy` step exits 1 when it cannot tell which deploy to read, or when the deploy it would read cannot be recorded yet. The last line of the step's log starts with `proofline:` and names the reason. Change the step as the matching section says, then run it again. A refused sign-in also exits 1: see [Restore GitHub Actions sign-in for a Proofline step](/help/ci-actions-oidc-exchange/).

## The step reads its own run

The log ends with "Proofline records the landing of a run's deploy only after the run completes."

Proofline records a deploy's landing only after the GitHub Actions run that deployed it completes. A step inside that run would wait for a record that cannot arrive while it runs. The step refuses before its first read when its `--run` names its own run, and after a read when a deploy of its own run is still waiting for its check.

Move the step into a workflow that starts when the deploying workflow completes:

```
name: Proofline deploy checks
on:
  workflow_run:
    workflows: [Deploy]
    types: [completed]
permissions:
  id-token: write
jobs:
  checks:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: curl -fsSL https://proofline.sh/cli | sh
      - run: ~/.local/bin/proofline ci deploy --environment production --until 1h
```

On `workflow_run`, the step reads the completed run's commit, run and attempt from the event. [Read the checks from a separate workflow](/docs/ci/#read-the-checks-from-a-separate-workflow) shows the full workflow, which also skips attempts that made no deploy. To read a check that comes due later, see [Read a deploy's hour or day check from a later pipeline run](/help/ci-deploy-later-check/).

## The commit has deploys in more than one environment

The log ends with "Proofline recorded deploys of this commit in more than one Proofline environment."

The step was given no filter that selects a deploy, and Proofline recorded the commit's deploys in several Proofline environments, such as staging and production. The step cannot choose one for you. A regression in any of them still ends the step with exit code 3 instead.

Add one of these options to name the deploy the step should judge:

-   `--environment NAME` for the GitHub Environment the deploy job used.
-   `--environment-id UUID` for the Proofline environment.
-   `--aws-run ID` for a CodePipeline execution or Amplify job.
-   `--deployment ID` for a GitHub deployment.
-   `--run ID` for the GitHub Actions run that deployed.

```
proofline ci deploy --environment production --until 1h
```

If the step then exits 2, no recorded deploy matches the filter: see [Find the deploy a CI deploy step could not match](/help/ci-deploy-no-matching-deploy/).

## The step cannot read the run it follows

The last line of the log starts with "proofline: the workflow\_run event payload names no completed run".

On a `workflow_run` event, a step that leaves out the commit or the run reads them from the event payload the runner wrote. The refusal means the step could not read that file or found no completed run in it, as happens in a container that does not mount the runner's event file.

Name the deploy on the command line so the step needs no payload. Pass the deploy's full commit with `--commit` and select it with `--deployment` or `--aws-run`. For a GitHub Actions deploy without a deployment ID, pass `--commit` with `--run`, and `--attempt` to select that attempt's deploy:

```
      - env:
          DEPLOYED_SHA: ${{ github.event.workflow_run.head_sha }}
          DEPLOY_RUN: ${{ github.event.workflow_run.id }}
          DEPLOY_ATTEMPT: ${{ github.event.workflow_run.run_attempt }}
        run: |
          ~/.local/bin/proofline ci deploy --commit "$DEPLOYED_SHA" \
            --run "$DEPLOY_RUN" --attempt "$DEPLOY_ATTEMPT" --until 1h
```

For command options and exit codes, see the [CI reference](/docs/ci/#deploy-checks).

## Related guides

-   [Read a deploy's hour or day check from a later pipeline run](/help/ci-deploy-later-check/)
-   [Find the deploy a CI deploy step could not match](/help/ci-deploy-no-matching-deploy/)
-   [Restore GitHub Actions sign-in for a Proofline step](/help/ci-actions-oidc-exchange/)
-   [Read Proofline results in CI](/help/read-proofline-results-in-ci/)
