Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
roblframpton opened this issue Dec 15, 2023 · 0 comments

Comments

@roblframpton
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant