Skip to content

Backslash is required on path parameter otherwise it silently defaults to root #82

@roblframpton

Description

@roblframpton

I tried the following code:

    - name: Upload artifact
      uses: actions/upload-pages-artifact@v2
      with:
        path: './dist'

but instead of getting the contents of my dist folder, I was getting my README rendered as HTML. Googling this was very tricky because lots of people have this problem for unrelated reasons. It took some experimentation to discover that a backslash on the path fixes the problem:

    - name: Upload artifact
      uses: actions/upload-pages-artifact@v2
      with:
        path: './dist/'

While I certainly think the first option should have worked, by far the more confusing thing is that the code apparetly silently defaults to showing your root directory (and latterly, showing your README if there is no index.html?). It would be much better if the pipeline failed if the specified path can't be found.

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