-
-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
inconsistent handling of symbolic links in publish_dir #103
Comments
Before looking into this, let me confirm that it's not a bug on my end where the symlink target does not exist. |
Update: the issue was on my end. Previously, I hadn't actually created the target files where the symlinks pointed. I fixed this in dhimmel/rootstock-actions-deploy@78350c1 and the build passed and properly deployed to the It looks like symlinks were handled in the following way. Symlinks to files (possibility 2 above) were preserved as symlinks. Symlinks to directories (possibility 1 above) were dereferenced and their contents copied. Was this discrepancy in behavior intentional? So @peaceiris feel free to close or rename this issue. While my original issue was my fault, there are some possible enhancements:
|
I got it. Yes, this problem is caused by the behavior of this action. This action copies the publish_dir to the The copy operation depends on the io.cp actions/toolkit. To solve this issue, we can:
|
@peaceiris I am not sure we're on the same page. Note that the initial problem I commented on was my fault... the target of the symlink did not exist because I did not create it.
If the symbolic link points to a target also in For symbolic links that point to a target outside of I think the ideal behavior is to preserve symlinks whose targets are within publish_dir, while dereferencing symlinks whose targets are outside of publish_dir. However, I'm not sure how challenging that is to implement. Perhaps there could also be an option. Dereferencing all symlinks is also a solution (as in |
Looks like
So if you combine
|
This comment has been minimized.
This comment has been minimized.
Could someone test the branch - name: Deploy
uses: peaceiris/actions-gh-pages@fix-copy-assets
with:
github_token: ${{ secrets.GITHUB_TOKEN }} |
I got the following error when building dhimmel/rootstock-actions-deploy@c29e40a:
The corresponding action step is:
I believe this error occurs because
webpage/images
is a symlink to another directory. The contents of thewebpage
directory, set aspublish_dir
, are something like:There are several types of possible symlinks:
Currently, I'm interested in a solution that solves 1 & 2.
The python ghp-import utility has a
--follow-links
argument (see c-w/ghp-import#37). When specified, it copies (dereferences) the contents of a symlink rather than preserving it. However, I think the ideal behavior is to preserve symlinks in categories 1 & 2 above (see c-w/ghp-import#70), since GitHub Pages can navigate symlinks.The text was updated successfully, but these errors were encountered: