Comments (10)
Symlinks do indeed work on gh-pages
Yes we can use symlinks on GitHub Pages but in some cases link target is not available or is based on an absolute path which cannot be resolved on the target branch.
To me it was easy, I just use cp with the flag to copy the file when a symlink is encountered
Thanks for pointing this out. I think we could mitigate this behavior here. I will take a look and keep you in touch.
from ghaction-github-pages.
Meanwhile, if that's not trivial to solve, I can run something like this:
for f in ${{ env.PKGDEST }}/*; do
if [ -L "$f" ]; then
rp=$(realpath "$f")
unlink "$f"
cp "$rp" "$f"
fi
done
To get rid of the symbolic links
from ghaction-github-pages.
@ranisalt I think it's linked to permissions issues on these files and your whole workflow where you tamper the GitHub Runner with your builduser
user. Fyi, the standard user in the GitHub Runner is already sudoer. You can try to recover permissions on pkgs
folder with sudo chown -R $(id -u):$(id -g) ./pkgs
before the GitHub Pages step.
from ghaction-github-pages.
@crazy-max this action runs as root, it should not have any permission issues, but I will try that nevertheless
from ghaction-github-pages.
No luck. Still the same problem, even with all files owned by root (id -u and id -g)
https://github.com/ranisalt/rsaur/runs/1627374177
from ghaction-github-pages.
- run: chown -R $(id -u):$(id -g) ${{ env.PKGDEST }}
should be:
- run: sudo chown -R $(id -u):$(id -g) ${{ env.PKGDEST }}
from ghaction-github-pages.
The action already runs as superuser. It is clear that the owner and group have been updated. id -u
and id -g
return root
.
from ghaction-github-pages.
I've just bumped into this issue after encountering the same problem. Symlinks do indeed work on gh-pages and can be quite useful (e.g to create an index.html
that directs to another page).
The PR referenced above is trying to get a bunch of automatically generated symlinks pushed to gh-pages for this exact use case. Such a workflow was used successfully on Travis until we had to migrate to Github Actions.
I'll try fiddling with file ownership as suggeted above to see if I can get it working. Meanwhile any suggestions about how to address this issue would be appreciated!
from ghaction-github-pages.
@jlstevens there are no issues with the ownership, it changes nothing. You have to replace links with the actual files instead.
To me it was easy, I just use cp
with the flag to copy the file when a symlink is encountered: https://github.com/ranisalt/rsaur/blob/825cf272159798d3d616f6fed8b241ce686bf7f4/.github/workflows/repo.yml#L56 where ${{ env.PKGDEST }}
is where the files are, and output
is where they will be copied into (the build_dir
for this action)
from ghaction-github-pages.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from ghaction-github-pages.
Related Issues (20)
- Newly generated file not included in commit HOT 2
- File already exists error HOT 5
- EEXIST: file already exists HOT 7
- How do I deploy static files of the main branch such as index CSS JSïŒ HOT 1
- Allow override git domain HOT 1
- Keeps history even with keep_history:false HOT 1
- Git history is overriden by the build process HOT 2
- Deleted files not removed when keep_history: true HOT 2
- Error: Cannot overwrite directory with non-directory HOT 2
- Parallel jobs causes randomly gh pages push failure HOT 1
- Document enabling `gh-pages` and `.nojekyll` HOT 2
- Allow absolute paths for the `build_dir` option
- fail to download action xxx
- How to set a custom domain during build and deployment? HOT 2
- Able to destroy main/master HOT 2
- Push to remote repo does not work HOT 2
- fatal: empty ident name (for <[email protected]>) not allowed HOT 1
- git exits with 128 in my action HOT 3
- Bbbj
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
ð Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ððð
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â€ïž Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghaction-github-pages.