New Option destination_dir for deploying to a subdirectory
See original GitHub issueIs your feature request related to a problem? Please describe
Some users seem to want to deploy to a subdirectory.
Describe the solution you’d like
Add a new option destination_dir
for setting a directory name.
Describe alternatives you’ve considered
We can use the option keep_files
in this case already. But it seems to be a little difficult for users to understand the behavior.
- name: Setup assets
run: |
mkdir public subdir1
mv your_contents ./subdir1/
mv ./subdir1 ./public/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
keep_files: true
After we get the destination_dir
option, the above steps will be merged into one as follows.
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
destination_dir: ./subdir1
Additional context
It seems tedious to implement and test it in consideration of a variety of situations.
To be investigated:
- #507 Weird nesting of content folders
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:25 (16 by maintainers)
Top Results From Across the Web
INF DestinationDirs section - Windows drivers - Microsoft Learn
A DestinationDirs section specifies the target destination directory or directories for all copy, delete, and/or rename operations on files ...
Read more >Build Inputs - Builds | Developer Guide | OpenShift Dedicated 3
If your application exists inside a sub-directory, you can override the default location (the root folder) using this field.
Read more >How to deploy a React app to a subdirectory | by Scott Vinkle
1. Set the basename. Setting the basename attribute on the <Router /> component tells React Router that the app will be served from ......
Read more >install — CMake 3.25.1 Documentation
New in version 3.21. This option causes all runtime dependencies of installed executable, shared library, and module targets to be added to the...
Read more >Working With Files - Gradle User Manual
You can include files in subdirectories by using an Ant-style glob pattern ( **/* ) ... They all share most of the configuration...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@m-mohr According to the following line, when the
keep_files
is false, only thedestination_dir
will be cleaned up.https://github.com/peaceiris/actions-gh-pages/blob/d3a97d53a80c403efae6ac6f0016b0ce79e5543b/src/git-utils.ts#L109-L116
@m-mohr I understood your suggestion now. (Sorry, I deleted my previous comment before I get your new reply.)
Thank you for the suggestion. I am working on https://github.com/peaceiris/actions-gh-pages/pull/569/files, I am happy if you review it.