Skip to content

cat: write error: Broken pipe #16

@tsoderling

Description

@tsoderling

I am getting the following error in my GitHub Actions workflow:

Run retypeapp/action-github-pages@5a952a4f53fc7366288db464ec120f755e9f1303
  with:
    update-branch: true
  env:
    DOTNET_ROOT: /usr/share/dotnet
    RETYPE_OUTPUT_PATH: /tmp/tmp.dWwlHQ4BbX
Run ${GITHUB_ACTION_PATH}/github.sh
  ${GITHUB_ACTION_PATH}/github.sh
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    DOTNET_ROOT: /usr/share/dotnet
    RETYPE_OUTPUT_PATH: /tmp/tmp.dWwlHQ4BbX
    INPUT_BRANCH: 
    INPUT_DIRECTORY: 
    INPUT_UPDATE_BRANCH: true
    INPUT_GITHUB_TOKEN: 
Retype built documentation path: /tmp/tmp.dWwlHQ4BbX
Target branch: retype
Target directory: ./
Fetching remote for existing branches: done.
Branch 'retype' already exists.
Switching to the 'retype' branch: done.
cat: write error: Broken pipe
Error: unexpected error trying to get config ID from 'resources/js/config.js'.
Cleaning up branch: error.
Error: Process completed with exit code 1.

This previously worked when we were having to manually install retypeapp using Node 20. Unfortunately all of that is broken, so I switched to the following workflow definition to utilize dotnet per the action-build instructions (with a tweak to make that work as it was broken out of the box for us):

jobs:
  publish:
    name: Build documentation
    runs-on: [self-hosted, kubernetes, large]
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
            
      - uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
        with:
          dotnet-version: 7.0.x

      # For some reason the default setup seems to overlook exporting the tools directory to PATH
      - name: Export retype destination
        run: |
          echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
        
      - uses: retypeapp/action-build@0f5c1e55453d13ec21ac8c441c9ebce6b2c4b0b0 # v3.6.0
        with:
          license: ${{ secrets.RETYPE_SECRET }}

      - uses: retypeapp/action-github-pages@5a952a4f53fc7366288db464ec120f755e9f1303 # latest
        with:
          update-branch: true

I can see the config.js file exists, and I can verify the contents, starting with var __DOCS_CONFIG__ =.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions