Comments (5)
Yes, you have specified the destination path to resolve to the root of the yceballost.github.io
. When using clean
, this will clean the destination path. If this is a directory the directory will be deleted. If it is a file, the file will be deleted. Since your dst_path resolves to the root directory, the entire repo is deleted.
Ok, so lets see if I correctly understand what you want.
You want to copy a folder named icn_export
to the root of yceballost.github.io
.
If the icn_export folder already exists in the yceballost.github.io
repo, then you want to delete it first. Correct?
If that's the case, change the src_path
to /icn_export/.
. Then set the dst_path
to /icn_export/.
. When clean
is set to true
, if a icn_export
folder exists in yceballost.github.io
, it will be emptied (effectively deleted). Then the action will copy over the new icn_export
folder from the source repo.
from copycat-action.
Great ! Happy to help π
If you by "fullstop" is referring to the dot .
, it technically has no meaning π. The dotslash /.
is similar to a "no-op", and refers to the immediately preceding directory. So you could also just ended with a slash "/". However, I do often find it useful to include. I tend to think of it as "the contents of this folder".
However, note that it is NOT the same if you end with just text, for example /icn_export
. This means the actual file or folder. Adding a slash to the end like /icn_export/
makes the expression handle the path as a directory.
from copycat-action.
Actually, I did some testing and I discovered that this is actually not the case with Copycat π±. The UNIX file system should behave as described above. However, it seems that Copycat treats a trailing slash /
and a trailing dotslash /.
differently π¨ Specifically, it is the ending with /
that is faulty.
I need to investigate this further. However, just use a trailing slashdot /.
if you want to refer to the contents of a folder. That works as expected and will not break with a potential fix π
. If you actually want to refer to the folder (or file) don't add anything to the end (just text).
from copycat-action.
Works perfect! Thanks mate!
What is the meaning of this last fullstop? /icn_export/.
from copycat-action.
I think I got a bit carried away π I forgot I am not following standard POSIX file system behavior. A lot of the standard cmd tools handles path resolving differently. Copycat heavily utilizes the unix cp
command. This utility seems to be the source of the "problems". However, we should create clearer and more detailed documentation regarding how Copycat handles paths.
from copycat-action.
Related Issues (20)
- Copy files to a different branch of the same repository HOT 2
- Feature proposal: --no-clobber option for the copy command HOT 1
- Add option to copy just folder contents instead of folder AND contents HOT 2
- How to use env variables in COMMIT_MESSAGE? HOT 1
- [FEATURE] dst_repo_owner and dst_repo_name should be merged in dst_repo
- [FEATURE REQUEST] Copy from GitHub Action Workspace to the repo's branch HOT 2
- fatal: could not read Password for 'https://***@github.com': No such device or address HOT 2
- Automatically detecting the default branch name. HOT 6
- Cannot find newly created folder called build HOT 3
- Action terminates successfully despite failure HOT 2
- Deleting contents of parent folder HOT 4
- CanΒ΄t exclude multiple folders. HOT 1
- Can we use github.token or secrets.github_token instead of personal access token HOT 1
- Removes files in the Destination repository. HOT 1
- Exclude pattern not working
- Copy each `commit_message` from source folder's git history HOT 1
- Personal Access Token in a Organization Secret "PERSONAL_TOKEN"
- i want to add a param src_repo_name
- REPOSITORY IS DEAD?
- How to include LFS files?
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 copycat-action.